Index: tests/language_2/multiple_interface_inheritance_test.dart |
diff --git a/tests/language_2/multiple_interface_inheritance_test.dart b/tests/language_2/multiple_interface_inheritance_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..741ebbf2bb4c3d6a1bb8af2553b78fd2292dc7c9 |
--- /dev/null |
+++ b/tests/language_2/multiple_interface_inheritance_test.dart |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+class I1 { |
Paul Berry
2017/08/26 14:53:44
Whoops, I forgot to mark I1 and I2 as "abstract".
|
+ void f(int i); |
+} |
+ |
+class I2 { |
+ void f(Object o); |
+} |
+ |
+abstract class C implements I1, I2 {} |
+ |
+class D extends C { |
+ void f(Object o) {} |
+} |
+ |
+abstract class E implements I2, I1 {} |
Jennifer Messerly
2017/08/26 00:24:16
oh wow -- so the analyzer analysis depends on the
Paul Berry
2017/08/26 14:53:44
Actually, it's the other way round. E works but C
|
+ |
+class F extends E { |
+ void f(Object o) {} |
+} |
+ |
+void g1(C c) { |
+ c.f('hi'); |
+} |
+ |
+void g2(E e) { |
+ e.f('hi'); |
+} |
+ |
+main() { |
+ g1(new D()); |
+ g2(new F()); |
+} |