Skip to content

Conversation

@mlechu
Copy link
Member

@mlechu mlechu commented Nov 21, 2025

Fix #60152, which impacted both lowering implementations.
remove-argument-side-effects assumed all kw arguments from a
parameters block had already been dumped into the argument list, which is
not true in some cases. In addition:

Fix JuliaLang#60152, which impacted both lowering implementations.
      `remove-argument-side-effects` assumed all `kw` arguments from a
     `parameters` block had already been dumped into the argument list, which is
     not true in some cases.  In addition:

- JuliaLowering hit a MethodError in the dumped-`kw` case regardless.  There are
     other issues with `kw` which I'm ignoring in this PR (see
     JuliaLang#60162)

- Delete some ancient history: `&` [used to be a valid argument](JuliaLang@a378b75#diff-5d79463faae0f7f19454c7f9888498d9f876082e258ab3efdca36a0ee64b0c87L72) head sometime in
     2012 apparently!
@mlechu mlechu added compiler:lowering Syntax lowering (compiler front end, 2nd stage) bugfix This change fixes an existing bug labels Nov 21, 2025
@mlechu mlechu requested a review from Keno November 22, 2025 02:35
pa_execs = 0
kw_execs = 0
f60152(v, pa; kw) = copy(v)
@test (f60152([1, 2, 3], 0; kw=0) .*= 2) == [2,4,6]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this function do something with the kw, to make sure it actually as the right value?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the test below is enough, although it technically tests something slightly different.

@Keno Keno merged commit 2be8847 into JuliaLang:master Nov 22, 2025
11 checks passed
@matthias314
Copy link
Contributor

Thanks for fixing this! Should the fix be backported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug compiler:lowering Syntax lowering (compiler front end, 2nd stage)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

keyword arguments don't work on left-hand side of broadcast assignments

3 participants