Skip to content

Conversation

@mlechu
Copy link
Member

@mlechu mlechu commented Nov 14, 2025

Moved from c42f/JuliaLowering.jl#99


@mlechu mlechu requested a review from c42f November 14, 2025 23:12
@mlechu mlechu changed the title Fix placeholders in parameters and decls, work around hasmethod [JuliaLowering] Fix placeholders in parameters and decls, work around hasmethod Nov 14, 2025
Copy link
Member

@topolarity topolarity left a comment

Choose a reason for hiding this comment

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

Since this has already gone through a round of feedback in c42f/JuliaLowering.jl#99, I think it's ready to merge 👍

Not a code owner, but changes look reasonable to me

@mlechu
Copy link
Member Author

mlechu commented Nov 18, 2025

Going to merge since I don't think there are any disagreements on these fixes, and I have unrelated fixes to make on top of these. Still feel free to give feedback @c42f !

@mlechu mlechu merged commit 625e8c7 into JuliaLang:master Nov 18, 2025
10 checks passed
mlechu added a commit to mlechu/julia that referenced this pull request Nov 19, 2025
… `hasmethod` (JuliaLang#60140)

Moved from c42f/JuliaLowering.jl#99

----
- Fix placeholders in positional and keyword arguments.
- Placeholder positional arguments sometimes need to be read from due to the
way we desugar keyword functions; give them an internal name. (fix
https://github.com/c42f/JuliaLowering.jl/issue/55, port
JuliaLang#58803)
  - Positional arguments may contain duplicate placeholders
- Keywords may be placeholders (which is strange) but may not be duplicates
- `kws...` may use a placeholder (fix
https://github.com/c42f/JuliaLowering.jl/issue/49)

- Allow placeholders in decls: `local`/`global _`, `local`/`global _::T`. This
can be produced by destructuring assignments. I've implemented this to
always drop the type (see
JuliaLang#57497),  but this may not be what we want.

- Work around `hasmethod` always returning false for
`world=typemax(UInt)` (some
discussion [here](JuliaLang#59808)). I'm
not sure we should be using `hasmethod` in the first place.

- Comment out our `@atomic` implementation. We need to implement this
for all forms that the normal `@atomic` takes, otherwise it hijacks the
expansion and  expects a simple form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants