Dart2JS does not give a static warning if not implementing inherited method interface with inherited method. #7641
Labels
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
Example:
class C {
int foo(int x) => x;
}
abstract class D {
int foo(int x, [int y]);
}
class E extends C implements D {}
typedef int foo2(int x, [int y]);
main() {
D d = new E();
foo2 foo = d.foo;
print(foo(2,2));
}
This should give a static warning since E is a non-static class that doesn't have a method matching the super-interface method D.foo.
It has an inherited method of the same name, but it's not matching (spec, section 7.10).
Gilad: Should this be a compilation error instead?
The text was updated successfully, but these errors were encountered: