-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentationtypes and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch
Description
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?
6Metadata
Metadata
Assignees
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentationtypes and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch