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

Issue 14730 - Wrong closure var access with -inline #4765

Merged
merged 2 commits into from
Feb 7, 2016

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jun 24, 2015

struct S
{
int n;
int get() { return x; } // x will be a cloaure variable
Copy link
Member

Choose a reason for hiding this comment

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

closure, not cloauasre (I gave up trying to type the typo)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ouch. Fixed!

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 5, 2015

I noticed that, moving the closure vars offset calculation into front-end will cause breaking of currently working code. Look at the added test case test14730x().

But I think it's questionable behavior, because I also found a @nogc violation issue around that.
https://issues.dlang.org/show_bug.cgi?id=14771

Anyway, I changed the bugfix way to more conservative.

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 30, 2015

Rebased on master, and ready for ddmd.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
14730 Wrong closure var access with -inline

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2016

OK.

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2016

Auto-merge toggled on

ibuclaw added a commit that referenced this pull request Feb 7, 2016
Issue 14730 - Wrong closure var access with -inline
@ibuclaw ibuclaw merged commit 2d0bcf1 into dlang:master Feb 7, 2016
@9rnsr 9rnsr deleted the fix14730 branch February 7, 2016 03:24
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.

3 participants