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

Unified Diff: tests/language/mixin_super_bound2_test.dart

Issue 1254933003: Modify DEP 34 language tests in preparation for adding analyzer support. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | tests/language/mixin_super_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/mixin_super_bound2_test.dart
diff --git a/tests/language/mixin_super_bound2_test.dart b/tests/language/mixin_super_bound2_test.dart
index 543a029492141f88a0e7ae4eec47ab289417560d..87e8b7ab22d8d45d4b3eec976743c19603f53c57 100644
--- a/tests/language/mixin_super_bound2_test.dart
+++ b/tests/language/mixin_super_bound2_test.dart
@@ -1,7 +1,7 @@
// Copyright (c) 2015, 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.
-// VMOptions=--supermixin
+// SharedOptions=--supermixin
import "package:expect/expect.dart";
@@ -15,13 +15,21 @@ bool inCheckedMode() {
return false;
}
-class MS<U, V extends U> { }
+class MS<U, V
+ extends U /// 01: static type warning
+ > { }
-class M<U extends V, V> extends MS<V, U> { }
+class M<U
+ extends V /// 01: continued
+ , V> extends MS<V, U> { }
-class NS<U extends V, V> { }
+class NS<U
+ extends V /// 01: continued
+ , V> { }
-class N<U, V extends U> extends NS<V, U> { }
+class N<U, V
+ extends U /// 01: continued
+ > extends NS<V, U> { }
class S<T> { }
@@ -42,7 +50,10 @@ main() {
new MNA2<num, int, bool>();
new MNA3<num, int, bool>();
new MNA4<num, int, bool>();
- if (inCheckedMode()) {
+ bool shouldThrow = false
+ || inCheckedMode() /// 01: continued
+ ;
+ if (shouldThrow) {
// Type parameter U of M must extend type parameter V, but
// type argument List<num> is not a subtype of List<int>.
Expect.throws(() => new MNA<int, num, bool>(), (e) => e is TypeError);
« no previous file with comments | « no previous file | tests/language/mixin_super_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698