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

Unified Diff: tests/language/mixin_supertype_subclass_test.dart

Issue 1646343002: Add shared tests demonstrating bug #25614. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/mixin_supertype_subclass4_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/mixin_supertype_subclass_test.dart
diff --git a/tests/language/mixin_supertype_subclass_test.dart b/tests/language/mixin_supertype_subclass_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..70627f64d5140c264dde56f30aa8d55f22c5b9c8
--- /dev/null
+++ b/tests/language/mixin_supertype_subclass_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2016, 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.
+// SharedOptions=--supermixin
+
+// Validate the following test from section 12 ("Mixins") of the spec:
+//
+// "Let M_A be a mixin derived from a class M with direct superclass
+// S_static.
+//
+// Let A be an application of M_A. It is a static warning if the
+// superclass of A is not a subtype of S_static."
+
+class B {}
+class C {}
+class D {}
+class E extends B with C implements D {}
+class F extends E {}
+class A = E with M;
+class M
+ extends B /// 01: ok
+ extends C /// 02: static type warning
+ extends D /// 03: ok
+ extends E /// 04: ok
+ extends F /// 05: static type warning
+ {}
+
+main() {
+ new A();
+}
« no previous file with comments | « tests/language/mixin_supertype_subclass4_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698