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

Fix type warning in pop_in/1 #14064

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Conversation

sabiwara
Copy link
Contributor

@sabiwara sabiwara commented Dec 12, 2024

Otherwise the type system complains about the fact that the nil clause is never used (in v1.18 rc.0):

Screenshot 2024-12-12 at 14 59 42

To be backported once/if merged.

@@ -3308,7 +3308,7 @@ defmodule Kernel do
end

defp nest_pop_in(:map, h, [{:access, key}]) do
quote do
quote generated: true do
Copy link
Member

Choose a reason for hiding this comment

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

Can you annotate the one a couple lines below too? It is just a matter of time until it warns too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done e165702

Copy link
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

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

Please merge and backport!

@sabiwara sabiwara merged commit a1938d4 into elixir-lang:main Dec 12, 2024
9 checks passed
@sabiwara sabiwara deleted the pop_in_ignore branch December 12, 2024 08:46
sabiwara added a commit that referenced this pull request Dec 12, 2024
@sabiwara
Copy link
Contributor Author

Backported ✅

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.

2 participants