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

Side by Side Diff: tests/language_strong/type_hoisting_test.dart

Issue 2954523002: fix #27259, implement covariance checking for strong mode and DDC (Closed)
Patch Set: merged and fix an analysis error Created 3 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 unified diff | Download patch
OLDNEW
1 // compile options: --hoist-signature-types --hoist-instance-creation --hoist-ty pe-tests
2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
5 import "package:expect/expect.dart"; 4 import "package:expect/expect.dart";
6 5
7 class A<T> { 6 class A<T> {
8 A(this.x, T z); 7 A(this.x, T z);
9 A.make(); 8 A.make();
10 void f(T x) {} 9 void f(T x) {}
11 static String g(String x) { 10 static String g(String x) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Expect.isTrue(b.f is ToVoid<int>); 54 Expect.isTrue(b.f is ToVoid<int>);
56 Expect.isTrue(B.g is Id<int>); 55 Expect.isTrue(B.g is Id<int>);
57 } 56 }
58 { 57 {
59 C c = new C(0, 1); 58 C c = new C(0, 1);
60 Expect.isTrue(c is C); 59 Expect.isTrue(c is C);
61 Expect.isTrue(c.f is ToVoid<int>); 60 Expect.isTrue(c.f is ToVoid<int>);
62 Expect.isTrue(C.g is Id<int>); 61 Expect.isTrue(C.g is Id<int>);
63 } 62 }
64 } 63 }
OLDNEW
« no previous file with comments | « tests/language_strong/covariant_subtyping_test.dart ('k') | tests/language_strong/type_no_hoisting_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698