[Issue 22564] New: AttributeSpecifier (grammar) definition is wrong

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 3 16:25:27 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22564

          Issue ID: 22564
           Summary: AttributeSpecifier (grammar) definition is wrong
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody at puremagic.com
          Reporter: rumbu at rumbu.ro

According to the official grammar this is the definition for an attribute
specifier:

AttributeSpecifier
    Attribute :
    Attribute DeclarationBlock

In fact, when you write

pure @safe nothrow @nogc:

or 

pure @safe nothrow @nogc { }


there are multiple attributes that will be applied to the subsequent
declarations.

Consequentely, in my opinion, the grammar is wrong and should be:

AttributeSpecifier
    Attributes :
    Attributes DeclarationBlock

Attributes
    Attribute
    Attribute Attributes

--


More information about the Digitalmars-d-bugs mailing list