Bug 9442 – typeid() doesn't work without `this.` for class fields
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-01T16:51:00Z
Last change time
2013-02-04T06:23:06Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2013-02-01T16:51:14Z
class C
{
this()
{
auto x = typeid(c); // L5 NG
auto y = typeid(this.c); // ok
}
C c;
}
void main() { }
$ test.d(5): Error: need 'this' to access member c