[Issue 5344] New: Interface Inheritance Problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 12 09:34:12 PST 2010
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: nobody at puremagic.com
ReportedBy: mandeep at brars.co.in
--- Comment #0 from Mandeep Singh Brar <mandeep at 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: -------
More information about the Digitalmars-d-bugs
mailing list