[Issue 24808] New: Semicolon expected after traits
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 12 17:25:53 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24808
Issue ID: 24808
Summary: Semicolon expected after traits
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: tim.dlang at t-online.de
The following code currently results in a syntax error:
```
struct TypeUDA(T)
{
alias Type = T;
}
enum E
{
@TypeUDA!short int16,
@TypeUDA!int int32,
@TypeUDA!long int64,
}
alias X = __traits(getAttributes, E.int32)[0].Type;
```
The error message is:
```
test.d(11): Error: semicolon expected to close `alias` declaration, not `.`
test.d(11): Error: no identifier for declarator `.Type`
```
--
More information about the Digitalmars-d-bugs
mailing list