-
-
Notifications
You must be signed in to change notification settings - Fork 595
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 15668 : __LINE__ evaluated at declaration context #5435
Fix 15668 : __LINE__ evaluated at declaration context #5435
Conversation
…ompile time when using -inline CTFE interpretr can recognize a form `CommaExp(DeclaraationExp(v), VarExp(v))` as a CTFEable variable declaration when `v._init` is `null`. In other cases, for examle a sole `DeclarationExp` should have v._init for CTFE-ability. Supply `VoidInitializer` to allow inlining the temporary for NRVO.
[REG 2.067] Issue 15490 - Error variable __nrvoretval cannot be modified at compile time when using -inline
Looks OK to me. @9rnsr? |
The commit title should include "Fix" though. |
Updated commit title. |
Looks good. Thanks! |
Auto-merge toggled on |
(PR #4261 was opened for 3 months. Maybe I got the mistake during its repeated rebasing.) |
Auto-merge toggled off |
@Dicebot Sorry, usually a regression fix should be based on |
Relevant argument deduction code was using declaration `loc` instead of instantiation `instLoc`
|
Sure! |
Relevant argument deduction code was using declaration
loc
instead of instantiation
instLoc
. Not sure if this is correct fix but at least it has helped with my test case :)Fixes https://issues.dlang.org/show_bug.cgi?id=15668