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> struct Foo
+::Function
end
ERROR: syntax: invalid "::" syntax around REPL[22]:1
Stacktrace:
[1] top-level scope
@ REPL[22]:1
Now, I happen to know enough about Julia to know that the following would probably work:
julia> struct Foo
(+)::Function
end
but I can imagine many users would not know what to do. If there's nothing wrong with allowing
the first case, I would suggest we might want to consider doing that. Otherwise, it would
be nice to get some sort of hint in the error message to tell the user what to do.
The text was updated successfully, but these errors were encountered:
Parses as a unary call to + on the expression ::Function, which is pretty useless. We could try terminating unary parsing if the next token is ::; will take some fiddling no doubt.
The following surprised me:
Now, I happen to know enough about Julia to know that the following would probably work:
but I can imagine many users would not know what to do. If there's nothing wrong with allowing
the first case, I would suggest we might want to consider doing that. Otherwise, it would
be nice to get some sort of hint in the error message to tell the user what to do.
The text was updated successfully, but these errors were encountered: