www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8347] New: Parser bug with const placed after ~this() in decl

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: dmitry.olsh gmail.com



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: -------
Jul 04 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8347


Henning Pohl <henning still-hidden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |henning still-hidden.de



PDT ---
https://github.com/D-Programming-Language/dmd/pull/1979

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8347




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a959f220ce7d6191d2247b5355acb9755fbe8e36


fix issues 8347, 8953 and 9401 - destructor and nothrow syntax

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 08 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8347


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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