[Issue 9442] New: typeid() doesn't work without `this.` for class fields

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 1 16:51:17 PST 2013


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

           Summary: typeid() doesn't work without `this.` for class fields
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-02-01 16:51:14 PST ---
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

-- 
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