http://d.puremagic.com/issues/show_bug.cgi?id=9249
Andrej Mitrovic <andrej.mitrov...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2013-01-10 20:40:57 PST --- What your sample is showing is downcasting, this is upcasting: class C1 { public T opCast(T)() if (is(T == string)) { return "C1"; } } class C2 : C1 { } void main() { C2 c2; C1 c1 = cast(C1)c2; } Both fail though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------