October 12 [Issue 24808] New: Semicolon expected after traits | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: tim.dlang@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` ``` -- |
Copyright © 1999-2021 by the D Language Foundation