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
Anonymous functions don't accept return type assertions:
julia> (((x::T, y::T)::T) where {T<:Int}) -> x + y
ERROR: syntax:"(x::T,y::T)" is not a valid function argument name
julia>function (((x::T, y::T)::T) where {T<:Int}); return x + y; end
ERROR: syntax: expected "("infunction definition
But this work:
julia> ((foo(x::T, y::T)::T) where {T<:Int}) = x + y
foo (generic function with 1 method)
julia>function ((foo(x::T, y::T)::T) where {T<:Int}); return x + y; end
foo (generic function with 1 method)
The text was updated successfully, but these errors were encountered:
Anonymous functions don't accept return type assertions:
But this work:
The text was updated successfully, but these errors were encountered: