-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
no call to Base.rest if vararg is all-underscore #38403
Conversation
src/julia-syntax.scm
Outdated
(st (gensy))) | ||
`(block | ||
(local ,st) | ||
,.(if (> n 0) `((local ,st)) '()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
() = a
actually currently produces a dangling NewVarNode
, which I guess is not a big deal, especially since it's a pretty contrived example, but I guess avoiding this doesn't hurt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's worth removing the unused NewvarNode.
This is perfectly fine, but I remain opposed to #37132 in the strongest possible terms. It's pure user harassment. In |
Co-authored-by: Jeff Bezanson <[email protected]>
c207a66
to
c7f4779
Compare
The real question is why aren't you ordering a new shower head? |
I just noticed that
a, _... = b
still contains a call toBase.rest
after lowering, which we probably don't want, especially if we eventually decide to go with #37132. This just skips all-underscore varargs during destructuring.