[Issue 13388] New: accept '@' before 'nothrow', 'pure', 'final', 'abstract' and 'override'
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Aug 27 23:59:38 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13388
Issue ID: 13388
Summary: accept '@' before 'nothrow', 'pure', 'final',
'abstract' and 'override'
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: ketmar at ketmar.no-ip.org
Created attachment 1391
--> https://issues.dlang.org/attachment.cgi?id=1391&action=edit
allow UDA-like syntax for some keyword attributes
there is some inconsistency between UDA-like attributes like '@trusted',
'@nogc' and so on and non-UDA-like attributes like 'pure' or 'nothrow'. we
can't force using UDA-syntax for latter, but we can at least allow it, so user
shouldn't remember that 'nothrow' is a keyword and '@safe' is an attribute.
this patch allows using some keyword attributes as UDAs. i.e. user can write:
void foo () @safe @nothrow @pure { … }
old syntax is supported too:
void foo () @safe nothrow pure { … }
so no code will be broken.
--
More information about the Digitalmars-d-bugs
mailing list