class A {
void f(Object x) {}
}
class B {
void f(String x) {}
}
class C extends A implements B {
void f(x) {
// Infers Object for x.
Object y = x;
String z = x;
// ^
// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
// [cfe] A value of type 'Object' can't be assigned to a variable of type 'String'.
}
}
This requires dart-lang/language#975 finished and landed.