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 7184 - parse error on *(x)++ #8218
Conversation
* reduced parser to the specified grammar
Thanks for your pull request and interest in making D better, @arBmind! 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
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8218" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean code!
e = parseUnaryExp(); | ||
e = new AST.CastExp(loc, e, t); | ||
error("C style cast illegal, use `%s`", e.toChars()); | ||
error("identifier or new keyword expected following `(...)`."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not appear to be covered by any test. Please add coverage. You can add a test to the fail_compilation directory to verify compile errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not changed any code here. The code is from line 8007. The diff display is not very accurate.
break; | ||
else | ||
{ | ||
e = parseUnaryExp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block does not appear to be covered by any test. Please add coverage. You can add a test to the fail_compilation directory to verify compile errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line comes from line 8015.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test for this at #8256. It should be pulled before this PR to ensure there isn't any breakage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new test is now broken by this PR.
To make this clear. I have not added any logic. This patch only removes code. This broke no existing unit test. I added a test that shows that the wrong behavior was fixed. If there was logic without a test before there is no test now. These should be added in a different PR. |
@arBmind We need a copyright assignment declaration from you. Please see instructions in the Readme of this repository. |
@JinShil Sorry this is legally not possible in Germany. The law here is basically "the Copyright is always by the author". I can only give away all kinds of "usage rights". If this is not compatible with this project, feel free to close this PR and use my work (the diff) on your own behalf or ignore it entirely. If you want to be compatible with every law, take a look at the CLA of Microsoft. https://cla.microsoft.com - The only CLA I was able to sign so far. |
If you prefer, it works if you take the Microsoft CLA, s/Microsoft/D Language Foundation/, sign it and email it to us. Thanks! |
@WalterBright the email was sent. |
It seems there are more bugs in this section of the parsing code. I wont have time for further deep investigations. Feel free to close this PR at will. |
see #7281 and #7442 for reference as well