[Issue 24808] Semicolon expected after traits
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 13 09:50:04 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24808
--- Comment #2 from Tim <tim.dlang at t-online.de> ---
Yes, it looks like this grammar change would be needed.
The following also does not compile, so it is consistent:
```
__traits(getAttributes, E.int32)[0].Type x;
```
Alternatively the grammar for BasicType could get:
```
TraitsExpression . QualifiedIdentifier
```
This would be similar to Typeof.
The same problem also exists for mixins:
```
alias X1 = mixin("Types")[0].Type;
alias X2 = mixin("Types").Type;
```
It is not a high priority. It was just unexpected.
--
More information about the Digitalmars-d-bugs
mailing list