[Issue 11010] New: typeid doesn't work on a member of an instance.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 11 03:49:45 PDT 2013


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

           Summary: typeid doesn't work on a member of an instance.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: pycerl at qq.com


--- Comment #0 from Zhouxuan <pycerl at qq.com> 2013-09-11 03:49:44 PDT ---
import std.stdio;

struct A
{
    A* p;
}

int main()
{
    A a;
    writeln(typeid(a.p)); // Error: need 'this' for 'p' of type 'A*'
    return 0;
}

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