https://d.puremagic.com/issues/show_bug.cgi?id=11689

           Summary: deprecated local function does not work
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Kenji Hara <[email protected]> 2013-12-05 00:06:30 PST ---
This code is allowed by grammar, but compiler rejects it.

void main()
{
    deprecated void foo() {}
}

'deprecated' should be parsed as a part of 'StorageClass'.

----
DeclarationStatement:
    Declaration   <--

Declaration:
    AliasDeclaration
    AliasThisDeclaration
    Decl   <--

Decl:
    StorageClasses Decl   <--
    BasicType Declarators ;
    BasicType Declarator FunctionBody
    AutoDeclaration

StorageClasses:
    StorageClass   <--
    StorageClass StorageClasses

StorageClass:
    abstract
    auto
    TypeCtor
    deprecated   <--
    enum
    extern
    final
    nothrow
    override
    pure
    __gshared
    Property
    scope
    static
    synchronized
----

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to