interface A{
void foo();
final void foo(int x){}
}
class B: A{
void foo(){}
}
void main(){
auto b = new B();
b.foo();
b.foo(10); // not callable using argument types (int)
}
Interface final methods are erased by the overloads of a subclass
pineapple via Digitalmars-d-learn Wed, 13 Jul 2016 17:06:56 -0700
I was surprised when this didn't work. What's the rationale? Is
there any better workaround than renaming methods?
- Interface final methods are erased b... pineapple via Digitalmars-d-learn
- Re: Interface final methods are... Adam D. Ruppe via Digitalmars-d-learn
