[Issue 11689] New: deprecated local function does not work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 5 00:06:33 PST 2013


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: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 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: -------


More information about the Digitalmars-d-bugs mailing list