Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1080)

Unified Diff: tests/language_2/multiple_interface_inheritance_test.dart

Issue 3010483002: Add tests demonstrating bugs #30547 and #30552. (Closed)
Patch Set: Mark interface classes as abstract Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language_2/language_2_dartdevc.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..137814cfede8aa3f48e2048bda0e6b0abd0225cb
--- /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.
+
+abstract class I1 {
+ void f(int i);
+}
+
+abstract 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 {}
+
+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());
+}
« no previous file with comments | « tests/language_2/language_2_dartdevc.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698