[Issue 17606] dmd wrongly accepts field without type when annotated with a UDA
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jul 5 12:21:31 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17606
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ag0aep6g at gmail.com
--- Comment #1 from ag0aep6g at gmail.com ---
As far as I can tell, the grammar allows it.
As a UserDefinedAttribute, `@foo` matches Property [1]. Property is one of the
options for StorageClass [2] (another option is the `auto` keyword). With
`@foo` matching StorageClass, `@foo a = false;` matches AutoDeclaration [3]
just like `auto a = false;` would.
[1] http://dlang.org/spec/attribute.html#Property
[2] http://dlang.org/spec/declaration.html#StorageClass
[3] http://dlang.org/spec/declaration.html#AutoDeclaration
--
More information about the Digitalmars-d-bugs
mailing list