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

Unified Diff: tests/language/mixin_mixin_test.dart

Issue 11953012: Add more mixin tests and start rejecting illegal syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files. Created 7 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
Index: tests/language/mixin_mixin_test.dart
diff --git a/tests/language/mixin_mixin_test.dart b/tests/language/mixin_mixin_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..c4716f32ebfae6304cfbd3ec492c0d5a15c9319b
--- /dev/null
+++ b/tests/language/mixin_mixin_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2013, 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 S { }
+class M1 { foo() => 42; }
+typedef M2 = S with M1;
+typedef C = S with M2;
+
+main() {
+ var c = new C();
+ Expect.isTrue(c is S);
+ Expect.isTrue(c is M1);
+ Expect.isTrue(c is M2);
+ Expect.isTrue(c is C);
+ Expect.equals(42, c.foo());
+}

Powered by Google App Engine
This is Rietveld 408576698