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 15668 : __LINE__ evaluated at declaration context #5435

Closed
wants to merge 3 commits into from
Closed

Fix 15668 : __LINE__ evaluated at declaration context #5435

wants to merge 3 commits into from

Conversation

mihails-strasuns
Copy link

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

9rnsr and others added 2 commits February 7, 2016 08:21
…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
@ibuclaw
Copy link
Member

ibuclaw commented Feb 10, 2016

Looks OK to me. @9rnsr?

@mathias-lang-sociomantic
Copy link
Contributor

The commit title should include "Fix" though.

@mihails-strasuns-sociomantic
Copy link
Contributor

Updated commit title.

@9rnsr
Copy link
Contributor

9rnsr commented Feb 11, 2016

Looks good. Thanks!

@9rnsr
Copy link
Contributor

9rnsr commented Feb 11, 2016

Auto-merge toggled on

@9rnsr
Copy link
Contributor

9rnsr commented Feb 11, 2016

(PR #4261 was opened for 3 months. Maybe I got the mistake during its repeated rebasing.)

@9rnsr
Copy link
Contributor

9rnsr commented Feb 11, 2016

Auto-merge toggled off

@9rnsr
Copy link
Contributor

9rnsr commented Feb 11, 2016

@Dicebot Sorry, usually a regression fix should be based on stable branch. Otherwise the fix won't be released in the next minor release (2.070.1).
Please close this PR, then reopen a new PR with the base branch changing.

Relevant argument deduction code was using declaration `loc`
instead of instantiation `instLoc`
@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
15490 [REG 2.067] Error variable __nrvoretval cannot be modified at compile time when using -inline

@mihails-strasuns
Copy link
Author

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants