https://issues.dlang.org/show_bug.cgi?id=2013
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|D1 (retired) |D2 Summary|Dynamic cast is incorrect |interface to interface |in some cases |dynamic cast is incorrect | |in some cases --- Comment #2 from Kenji Hara <[email protected]> --- Still happens in D2. (In reply to David Friedman from comment #1) > Created attachment 248 [details] > Test Cast Simplified the test case: interface IA { int mA(); } interface IB : IA { int mB(); } interface IC : IB { } interface ID : IA, IC { int mD(); } class C : ID { int mA() { return 1; } int mB() { return 2; } int mD() { return 3; } } void main() { C c = new C; IA ia = c; IB ib = cast(IB)ia; assert(ib.mB() == 2); } --
