[Issue 17606] dmd wrongly accepts field without type when annotated with a UDA
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jul 6 22:57:48 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17606
Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Hardware|x86 |All
OS|Linux |All
--- Comment #2 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
Yeah, pretty sure you can add anything to a declaration that distinguishes it
from a statement, which apparently includes UDAs. "auto" is a no-effect keyword
that you can use if you have nothing else to write there. Same reason why
`const foo() { return 1; }` is valid inside a method.
--
More information about the Digitalmars-d-bugs
mailing list