-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
This issue was originally filed by [email protected]
What steps will reproduce the problem?
Run the following test with dartc:
interface SI1 {
void foo(var v, [int foo, int bar]);
}
interface SI2 {
void foo(var v, [int foo, int b4r]);
}
interface I extends SI1, SI2 {}
main() {
I i = null;
i.foo(null, null, null);
}
What is the expected output? What do you see instead?
According to the section 8.4.1 of the specification: "if there are multiple members m1, …, mk with the same name n that would be inherited (because identically named members existed in several superinterfaces) then at most one member is inherited. If the static types T1, …, Tk of the members m1, …, mk are not identical, then there must be a member mx such that Tx <: Ti, 1 <= x <= k for all i, 1 <= i <= k, or a static type warning occurs."
So, expected result is a static warning, since foo of S1 and foo of S2 have different types and none of them is a subtype of another.
Actual result: dartc does not produce a static warning.
What version of the product are you using? On what operating system?
Dartc, r8088. OS Ubuntu 10.04
Please provide any additional information below.
co19 tests:
Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t01.dart
Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t03.dart
Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t04.dart
Language/08_Interfaces/4_Superinterfaces/1_Inheritance_and_Overriding_A02_t04.dart