You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> type A{T, V} end
julia>f{T, V}(::A{T, V}, ::A{T, V}) =1
f (generic function with 1 method)
julia>f{T, V}(::A, ::A{T, V}) =1
f (generic function with 2 methods)
julia>methods(f)
#2 methods for generic function "f":f{T,V}(::A{T,V},::A{T,V}) at none:1f{T,V}(::A{T,V},::A{T,V}) at none:1
IMHO, it would be nice to print the second definition as
f{T, V}(::A, ::A{T, V})
And just omit the unbounded TypeVar parameters of A
Actually I would almost argue that printing the parameter name of a parametrized type in general is quite confusing. I still can't stop copying sth like Array{T, N} into the code and get a UndefVarError = = ...
The text was updated successfully, but these errors were encountered:
Guess which one is which
IMHO, it would be nice to print the second definition as
And just omit the unbounded
TypeVar
parameters ofA
Actually I would almost argue that printing the parameter name of a parametrized type in general is quite confusing. I still can't stop copying sth like
Array{T, N}
into the code and get aUndefVarError
= = ...The text was updated successfully, but these errors were encountered: