http://d.puremagic.com/issues/show_bug.cgi?id=5344

           Summary: Interface Inheritance Problem
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: mand...@brars.co.in


--- Comment #0 from Mandeep Singh Brar <mand...@brars.co.in> 2010-12-12 
09:32:28 PST ---
The following code does not compile.

import std.stdio;
interface A {
    public void a(int l);
}
class ACl:A {
    public void a(int l) {
        writeln("Hello a");
    }
}

interface B: public A {
    public void a(string l, int k);
}

class BCl: ACl, B {
    public void a(string l, int k) {
        writeln("Hello B.a", l, k);
    }
}


int main() {
    B b = new BCl();
    b.a(1);
    return 0;
}

However changing the second line of main() to (cast(A)b).a(1) makes it work.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to