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
What makes you think that this is the expected behaviour? We're matching Meta.parse here:
julia> CSTParser.parse("global a=2, b")
1:13 global
1:6 1:1 OP: =
1:1 a
2:5 tuple
2:2 INTEGER: 2
3:3 b
julia> CSTParser.to_codeobject(CSTParser.parse("global a=2, b"))
:(global a = (2, b))
julia> Meta.parse("global a=2, b")
:(global a = (2, b))
julia> global a = (2,b)
ERROR: UndefVarError: b not defined
Stacktrace:
[1] top-level scope
@ REPL[11]:1
julia> b = 2
2
julia> global a = (2,b)
(2, 2)
julia> a
(2, 2)
When global statement is parsed, there is a incorrect behavior.
Here is the example
source:
The statement above is parsed into:
(global (assign a (tuple 1 b)))
whereas the expected one is:
(global (assign a 1) b)
Hope for a fix.
The text was updated successfully, but these errors were encountered: