The spec says that a user-defined attribute must be an expression, but DMD accepts a wide range of things as UDAs:struct Foo { string name = "unknown"; } @Foo int bar;
IIRC symbol reference is a primary expression.
Kagamin via Digitalmars-d-learn Fri, 02 Nov 2018 01:40:40 -0700
The spec says that a user-defined attribute must be an expression, but DMD accepts a wide range of things as UDAs:struct Foo { string name = "unknown"; } @Foo int bar;
IIRC symbol reference is a primary expression.