[Issue 11366] New: typeid on field access gives CT error: need 'this'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 27 02:04:53 PDT 2013


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

           Summary: typeid on field access gives CT error:  need 'this'
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thelastmammoth at gmail.com


--- Comment #0 from thelastmammoth at gmail.com 2013-10-27 02:04:50 PDT ---
class A{}
struct B{
  A a;
}

void main(){
  B b;
  b.a=new A;
  auto a=b.a;
  auto c=typeid(a);
  auto c2=typeid(b.a);//CT error: need 'this' for 'a' of type main.A
}

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