[Issue 8347] New: Parser bug with const placed after ~this() in decl

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 4 02:28:54 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8347

           Summary: Parser bug with const placed after ~this() in decl
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dmitry.olsh at gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2012-07-04 02:28:45 PDT ---
A small test shows parser inconsistency:

struct A{
    //const this(int dummy){} //fine
    this(int dummy) const {} //and this too
    ~this() const{} //NG
    //const ~this(){} //this work
}

void main(){}

Output:
m1.d(4): Error: semicolon expected following function declaration

Note that const in front of ~this works but not after unlike  any other member
function/constructor.

Tested with latest git master for 2.060, must have been in previous versions as
well.

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


More information about the Digitalmars-d-bugs mailing list