http://d.puremagic.com/issues/show_bug.cgi?id=4647
--- Comment #1 from Andrej Mitrovic <[email protected]> 2010-08-15 12:04:34 PDT --- Comment from Lukasz Wrzosek >This: > app.Timer.run(); // error, no Timer property > app.Application.run(); // error, no Application property > >probably should be: > (cast(Timer)app).run(); > (cast(Application)app).run(); > >But app.run() is still ambiguous - should not compile. I don't see why I would need a cast. I can explicitly call methods from inherited classes, like so: import std.stdio; class Base { void test() { writeln("Base.test()"); }; } class Derived : Base { override void test() { writeln("Derived.test()");} } class SecondDerived : Derived { } void main() { auto var = new SecondDerived; var.Base.test(); // calls Base.test() var.Derived.test(); // calls Derived.test() } So why shouldn't I be able to do the same with interfaces? TDPL allows it, I think it should be allowed in DMD. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
