www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20503] New: incorrect grammar specification for attributes


          Issue ID: 20503
           Summary: incorrect grammar specification for   attributes in
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: dkorpel live.nl

These do compile:
void foo()  safe  nogc {}
void bar()  ("uda") {}
According to the spec, only const, immutable, inout, return, shared, nothrow,
pure and  property are allowed after the parameter list. 


These also compile:
 safe foo() {}
 ("uda") foo() {}
 ("uda") x = 3, y = 3;
`AtAttribute` is not in `StorageClass` (which is used in AutoDeclaration and
AutoFuncDeclaration), so according to the spec these are not allowed.


I think adding AtAttribute to MemberFunctionAttribute and StorageClass would
fix this but I haven't checked what the implementation exactly permits and

Jan 14 2020