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

[REG] Issue 14779 - incorrect addressing of arguments in require/in-contract #4803

Merged
merged 1 commit into from Jul 8, 2015

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jul 7, 2015

https://issues.dlang.org/show_bug.cgi?id=14779

In VarDeclaration::checkNestedReference(), although fdthis is '__require'
or '__ensure', and hat will get called directly and won't make outer functions
closure, the variable has to be appended to fdv->closureVars[] to make
fdv->hasNestedFrameRefs() returning true.

@MartinNowak
Copy link
Member

Please target stable.
If you use the nice git-hub tool, it's as easy as git hub pull new -b stable.

@MartinNowak
Copy link
Member

Ah, forget about my comment. The issue doesn't affect the stable branch.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 7, 2015

Yes, recent wrong-code bug fixes around contracts are only in master branch.

@MartinNowak
Copy link
Member

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 7, 2015

Sure this works well with https://github.com/D-Programming-Language/dmd/blob/4e5a31ec6be106ef6c30f7cb3f36de0c1447c8fb/src/func.c#L4377?

No, the property function is final, so isVirtualMethod() returns false.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 7, 2015

@MartinNowak The line would be the correct location I should fix. When Walter had fixed issue 7335 in ff560ef, he added isVirtualMethod(), but it wrongly excluded final functions.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 7, 2015

@MartinNowak All green.

@MartinNowak
Copy link
Member

Auto-merge toggled on

MartinNowak added a commit that referenced this pull request Jul 8, 2015
[REG] Issue 14779 - incorrect addressing of arguments in require/in-contract
@MartinNowak MartinNowak merged commit 971b319 into dlang:master Jul 8, 2015
@9rnsr 9rnsr deleted the fix14779 branch July 8, 2015 11:29
@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 8, 2015

Thanks!

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