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

Unified Diff: tests/language/deferred_inheritance_constraints_test.dart

Issue 190553002: Tests that inheritance of deferred classes is disallowed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test for redirecting constructor. Remove status-changes. Use new syntax Created 6 years, 5 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/deferred_inheritance_constraints_lib.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/deferred_inheritance_constraints_test.dart
diff --git a/tests/language/deferred_inheritance_constraints_test.dart b/tests/language/deferred_inheritance_constraints_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4781bce86f773c578495b8b8d617cf18e39a05d2
--- /dev/null
+++ b/tests/language/deferred_inheritance_constraints_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2014, 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.
+
+import "package:expect/expect.dart";
+import "deferred_inheritance_constraints_lib.dart" deferred as lib;
+
+class C extends lib.E {} /// extends: compile-time error
floitsch 2014/07/04 11:28:39 Not necessary this time, but normally I prefer '//
sigurdm 2014/07/07 08:12:21 Done.
+class D implements lib.E {} /// implements: compile-time error
+class B {}
+class E = B with lib.E; /// mixin: compile-time error
+class F { /// redirecting_constructor: static type warning, runtime error
+ factory F() = lib.E; /// redirecting_constructor: continued
+} /// redirecting_constructor: continued
+
+void main() {
+ new C(); /// extends: continued
+ new D(); /// implements: continued
+ new E(); /// mixin: continued
+ new F(); /// redirecting_constructor: continued
+}
« no previous file with comments | « tests/language/deferred_inheritance_constraints_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698