-
-
Notifications
You must be signed in to change notification settings - Fork 610
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 Issue 19774 - wrong code caused by opIndex #9696
Conversation
|
Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
|
|
Stable. |
|
Using the result of a comma expression has been deprecated. I don't know if that negatively affects this technique or not. |
It does not. Internally, coma expressions are used all over the place. |
I wanted to make sure that the failures are not due to stable missing any patches. Once I fix the issue properly, I will rebase on top of stable |
|
OK. Ping me when this is GTG. |
|
E: Some index files failed to download. They have been ignored, or old ones used instead. on stable |
|
@RazvanN7 rebasing the branch might fix the CircleCI issue. |
|
@jacob-carlborg I already rebased on top of stable. |
|
@thewilsonator Good to go. CircleCi failure unrelated. |
|
CircleCI is using Debian Jessie, which I think is not supported anymore. |
|
Yup -> https://circleci.com/gh/dlang/dmd/tree/stable |
|
Maybe @RazvanN7 didn't update his local |
|
@RazvanN7 Did it fix also the same bug for opDollar? |
|
@RazvanN7 Thank for the most clear explanation! |
|
@WalterBright Thanks! |
return bar()[1]is rewritten to :Which looks correct, but the problem is that
C __dop3is generated with a lifetime that lasts until the end of the expression. As a consequence the destructor is called before the return statement. In order to fix this I rewrote the CompoundStatement that the compiler generated to a simple return statement that has a Comma expression : return (C __dop3 = bar(); __dop3.opIndex(1));