Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"SSAValue" syntax error parsing this keyword argument #44343

Closed
zot opened this issue Feb 25, 2022 · 1 comment · Fixed by #44346
Closed

"SSAValue" syntax error parsing this keyword argument #44343

zot opened this issue Feb 25, 2022 · 1 comment · Fixed by #44346
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior compiler:lowering Syntax lowering (compiler front end, 2nd stage)

Comments

@zot
Copy link

zot commented Feb 25, 2022

The last call to f in this produces a syntax error:

f(x; kw...) = println(x, kw)

f(3, u = 4)

tuple = (; Symbol("@/1") => (;
                             set = (; ref = 1),
                             metadata = (;
                                         type = "Main.PersonApp",
                                         create = :PersonApp,
                                         )
                             ),
     )

f(3, u = tuple)

f(3, u = (; Symbol("@/1") => (;
                             set = (; ref = 1),
                             metadata = (;
                                         type = "Main.PersonApp",
                                         create = :PersonApp,
                                         )
                             ),
       )
)

The error is:

ERROR: LoadError: syntax: invalid named tuple element "SSAValue(86)" around /tmp/tst.jl:16
Stacktrace:
 [1] top-level scope
   @ /tmp/tst.jl:16
in expression starting at /tmp/tst.jl:16
@zot zot changed the title "SSAVALUE" syntax error parsing this keyword argument "SSAValue" syntax error parsing this keyword argument Feb 25, 2022
@oscardssmith
Copy link
Member

oscardssmith commented Feb 25, 2022

Reduced to

f(;kw...) = kw
f(u = (; :a => 1))
ERROR: syntax: invalid named tuple element "SSAValue(48)" around REPL[8]:1
Stacktrace:
 [1] top-level scope
   @ REPL[8]:1
   
julia> u = (; :a => 1)
(a = 1,)
julia> f(u=u)
pairs(::NamedTuple) with 1 entry:
  :u => (a = 1,)

@oscardssmith oscardssmith added bug Indicates an unexpected problem or unintended behavior parser Language parsing and surface syntax labels Feb 25, 2022
@JeffBezanson JeffBezanson self-assigned this Feb 25, 2022
@JeffBezanson JeffBezanson added compiler:lowering Syntax lowering (compiler front end, 2nd stage) and removed parser Language parsing and surface syntax labels Feb 25, 2022
staticfloat pushed a commit to JuliaCI/julia-buildkite-testing that referenced this issue Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior compiler:lowering Syntax lowering (compiler front end, 2nd stage)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants