Bug 8347 – Parser bug with const placed after ~this() in decl
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-04T02:28:00Z
Last change time
2013-05-08T17:31:04Z
Keywords
pull
Assigned to
nobody
Creator
dmitry.olsh
Comments
Comment #0 by dmitry.olsh — 2012-07-04T02:28:45Z
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.