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
a = :(f(x,=(y,3))).args[3]
b = :(f(x,y=3)).args[3] #This one will produce something else/a syntax error.
((a.head,a.args),(b.head,b.args)) #->((call,{=, y, 3}),(=,{y, 3}))
It isn't clear anymore how to make some arbitrary expression if the parser 'gets in your way'? Can be done though:
c = :(f(x,$Expr(:(=),{:y,3},Any))).args[3] #-> y = 3, that was what we wanted.
This isn't really a big deal, we're just reserving this syntax for keyword arguments in the future, so it should be an error now to ensure that code doesn't break.
In a sense maybe it was better off in eval(or the equivalent) or codegen.cpp somehow, so quote .. end and :(..) aren't affected, but too much goes on there already i guess.
This reserves the syntax for keyword arguments in the future (#485).
The text was updated successfully, but these errors were encountered: