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 22127 - compiler assertion failure parser on UDA and functi… #13368
Conversation
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "stable + dmd#13368" |
stable |
It's neither a regression nor critical. |
ICEs go to stable (unless it _only _occurs in master which presumably this doesn't) |
src/dmd/parse.d
Outdated
(*tf.parameterList.parameters)[0].userAttribDecl = new AST.UserAttributeDeclaration(udas, as); | ||
if (tpl_ is null || tpl_.members.dim != 1) | ||
{ | ||
error("user-defined attributes not allowed for `alias` declarations"); |
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.
error("user-defined attributes not allowed for `alias` declarations"); | |
error("user-defined attributes are not allowed on `alias` declarations"); |
This catches the segfault which is good but the code should be allowed, right? If it's allowed the error message needs to propose an alternative (Identity template?) |
@WalterBright yes, ICEs should target stable. |
ping @WalterBright |
@WalterBright Can you please address @maxhaton 's comment and target stable so that we can move on with this PR? |
@maxhaton I'm not really sure what the purpose if having an UDA on an alias is. Aliases are merely placeholders for the actual symbol, so having the UDA directly on the aliasee would be the alternative. Anyway, whatever path we choose to take should the topic of a different PR. |
… non-constant initializer
…renthesized expression to a typedef.d type is parsed incorrectly
I screwed up the rebase, but I opened a new PR with this: #13566 |
…on literal