http://d.puremagic.com/issues/show_bug.cgi?id=9249
Andrej Mitrovic <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Andrej Mitrovic <[email protected]> 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: -------
