-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
0-keyword argument funcalls fail #18845
Labels
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
Comments
Related to although not exactly dup of #9498 |
Is there a reason why |
Yes, the Also. julia> :(foo(; $(no_kwargs...)))
:(foo(; ))
julia> :(foo(; no_kwargs...))
:(foo(; no_kwargs...))
julia> expand(:(foo(; $(no_kwargs...))))
:(((Core.kwfunc)(foo))((Base.vector_any)(),foo))
julia> expand(:(foo(; no_kwargs...)))
:($(Expr(:thunk, CodeInfo(:(begin
SSAValue(0) = (Base.vector_any)()
SSAValue(1) = no_kwargs
#s2 = (Base.start)(SSAValue(1))
4:
unless !((Base.done)(SSAValue(1),#s2)) goto 19
SSAValue(2) = (Base.next)(SSAValue(1),#s2)
SSAValue(3) = (Core.getfield)(SSAValue(2),1)
#temp# = (Base.start)(SSAValue(3))
SSAValue(4) = (Base.indexed_next)(SSAValue(3),1,#temp#)
SSAValue(5) = (Core.getfield)(SSAValue(4),1)
#temp# = (Core.getfield)(SSAValue(4),2)
SSAValue(6) = (Base.indexed_next)(SSAValue(3),2,#temp#)
SSAValue(7) = (Core.getfield)(SSAValue(6),1)
#temp# = (Core.getfield)(SSAValue(6),2)
#s2 = (Core.getfield)(SSAValue(2),2)
(Core.ccall)(:jl_array_ptr_1d_push2,Void,(Core.svec)(Any,Any,Any),SSAValue(0),0,(Core.typeassert)(SSAValue(5),Core.Symbol),0,SSAValue(7),0)
17:
goto 4
19:
unless (Base.isempty)(SSAValue(0)) goto 22
return foo()
22:
return ((Core.kwfunc)(foo))(SSAValue(0),foo)
end))))) |
Oh, right, then my work-around is mistaken. Edited. |
JeffBezanson
added a commit
that referenced
this issue
Oct 10, 2016
fix #18845, call with 0 keyword args splatted after `;`
tkelman
pushed a commit
that referenced
this issue
Feb 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow-up to #14758. On 0.5.0
Similarly:
The text was updated successfully, but these errors were encountered: