As desired, the following code fails to compile:
unittest {
interface Foo {
int a();
}
}
unittest {
Foo f;
f.a();
}
However, the following code *does* compile:
unittest {
interface Foo {
int a();
}
}
unittest {
interface Foo {
int b();
}
Foo f;
f.a(); // we have the wrong Foo here
}
and if f.a() is changed to f.b(), it doesn't compile.
Comment #1 by yebblies — 2012-01-29T19:41:44Z
Works with current dmd (2.058 & 1.068)
Comment #2 by yebblies — 2012-01-29T19:45:54Z
Wait a sec, Reiner Pope? Did we go to the same highschool?