-
-
Notifications
You must be signed in to change notification settings - Fork 608
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 23785: ICE with -preview=in when passing enum at CTFE
#14999
base: stable
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request, @Geod24! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
|
d721a3e
to
ba939f0
Compare
| ev = new CommaExp(arg.loc, ev, new VarExp(arg.loc, v)); | ||
| arg = ev.expressionSemantic(sc); | ||
| eprefix = Expression.combine( | ||
| eprefix, (new DeclarationExp(arg.loc, v)).expressionSemantic(sc)); |
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.
Hmm, this looks like it messes with the argument expressions evaluation order - evaluating these in rvalues before all other argument expressions, regardless of their position.
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.
Good catch! Changed the fix and added a test.
ba939f0
to
1ef85d6
Compare
|
@kinke and I discussed and there's a need for some more tests/work, as e.g. temporaries are now always destroyed even if not constructed. |
|
Is this still an improvement on its own @Geod24 ? |
|
@Geod24 What's the status of this PR? |
|
It needs work, as per the label. |
1ef85d6
to
f9bfa63
Compare
f9bfa63
to
7648dec
Compare
7648dec
to
7ec2fcb
Compare
|
@kinke : I added a test to ensure that a non-constructed rvalues structs are not destructed |
No description provided.