http://d.puremagic.com/issues/show_bug.cgi?id=2814
Summary: implicit cast (implemented via alias this) is not triggered when passing to function Product: D Version: 2.027 Platform: PC OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: 2kor...@gmail.com struct Proxy { private Object o; Object get() { return o; } alias get this; } void foo(Object o) { } void main() { Proxy proxy; //foo(proxy); // should work, but doesn't Object o = proxy; // workaround foo(o); } test.d(17): Error: function test.foo (Object o) does not match parameter types ( Proxy) test.d(17): Error: cannot implicitly convert expression (proxy) of type Proxy to object.Object --