Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Issue 9650 - __traits(compiles) + mixin #1728

Merged
merged 1 commit into from Mar 23, 2013

Conversation

Projects
None yet
2 participants
Member

9rnsr commented Mar 8, 2013

http://d.puremagic.com/issues/show_bug.cgi?id=9650

I couldn't minimize test case, but the bug fix is obvious.

The bug had been hiding for a long time, but recent Phobos change (dlang/phobos@2a88fea) had exposed the bug.

When a mixin expression gets invalid code string, the parsing error had not handled correctly. In such case, it had generated invalid AST instead of returning ErrorExp. I guess that the invalid AST would report weird error in later semantic analysis.

I think that both CompileDeclaration and CompileStatement do not have same problem. So they are not changed.

@9rnsr 9rnsr fix Issue 9650 - __traits(compiles) + mixin
I couldn't minimize test case, but the bug fix is obvious.

The bug had been hiding for a long time, but recent Phobos change (dlang/phobos@2a88fea) had exposed the bug.

When a mixin expression gets invalid code string, the parsing error had not handled correctly. In such case, it had generated *invalid* AST instead of returning ErrorExp. I guess that the invalid AST would report weird error in later semantic analysis.

I think that both CompileDeclaration and CompileStatement do not have same problem. So they are not changed.
ac89791

@WalterBright WalterBright added a commit that referenced this pull request Mar 23, 2013

@WalterBright WalterBright Merge pull request #1728 from 9rnsr/fix9650
Issue 9650 - __traits(compiles) + mixin
618d827

@WalterBright WalterBright merged commit 618d827 into dlang:master Mar 23, 2013

1 check was pending

default Pass: 2, In Progress: 1, Pending: 7
Details

@WalterBright WalterBright added a commit that referenced this pull request Mar 23, 2013

@WalterBright WalterBright Merge pull request #1728 from 9rnsr/fix9650
Issue 9650 - __traits(compiles) + mixin
a4de3b4

@WalterBright WalterBright added a commit that referenced this pull request Mar 23, 2013

@WalterBright WalterBright Merge pull request #1728 from 9rnsr/fix9650
Issue 9650 - __traits(compiles) + mixin
f62c899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment