Skip to content

ambiguity warning missing? #3025

@vtjnash

Description

@vtjnash
julia> function z(a::(Integer,Integer)...)
       println(4)
       end
# methods for generic function z
z(a::(Integer,Integer)...) at none:2

julia> function z{T}(a::(T,T)...)
       println(5)
       end
# methods for generic function z
z(a::(Integer,Integer)...) at none:2
z{T}(a::(T,T)...) at none:2

julia> z((1,2),(3,int32(3))) #good
4

julia> z((1,2),(3,3)) #oops, expecting 5
4

julia> function z{T<:Integer}(a::(T,T)...)
       println(6)
       end

julia> z((1,2),(3,4)) # ok, that's better but why?
6

Metadata

Metadata

Assignees

Labels

docsThis change adds or pertains to documentationtypes and dispatchTypes, subtyping and method dispatch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions