Skip to content

Fix missed optimization of Kernel.put_elem/3 - #15480

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:ls-put_elem-rewrite
Jun 15, 2026
Merged

Fix missed optimization of Kernel.put_elem/3#15480
josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:ls-put_elem-rewrite

Conversation

@lukaszsamson

Copy link
Copy Markdown
Contributor

?reorder macro added in 87582af used wrong arity and wrong erlang call. No impact besides missed optimization

?reorder added in 87582af used wrong arity and wrong erlang call
@sabiwara

Copy link
Copy Markdown
Contributor

Nice catch! Maybe we could add a test to control_test.erl?

@josevalim

Copy link
Copy Markdown
Member

I don't think we need a test honestly because the test would be basically duplicating a line from a macro. :( It would have caught the regression, but only if we duplicate all. A code review would also have caught it (my bad).

@josevalim
josevalim merged commit 784db65 into elixir-lang:main Jun 15, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

josevalim pushed a commit that referenced this pull request Jun 15, 2026
?reorder added in 87582af used wrong arity and wrong erlang call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants