Bug 11366 – typeid on field access gives CT error: need 'this'

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-27T02:04:00Z
Last change time
2013-11-02T05:53:58Z
Assigned to
nobody
Creator
thelastmammoth

Comments

Comment #0 by thelastmammoth — 2013-10-27T02:04:50Z
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 }
Comment #1 by k.hara.pg — 2013-11-02T05:53:58Z
*** This issue has been marked as a duplicate of issue 11010 ***