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

Unified Diff: tests/language_strong/type_no_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language_strong/type_hoisting_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_strong/type_no_hoisting_test.dart
diff --git a/tests/language_strong/type_no_hoisting_test.dart b/tests/language_strong/type_no_hoisting_test.dart
deleted file mode 100644
index a9cba0c24a67f0e18abdbe5a598019297a069269..0000000000000000000000000000000000000000
--- a/tests/language_strong/type_no_hoisting_test.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// compile options: --no-hoist-signature-types --no-hoist-instance-creation --name-type-tests
-// 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.
-import "package:expect/expect.dart";
-
-class A<T> {
- A(this.x, T z);
- A.make();
- void f(T x) {}
- static String g(String x) {
- return x;
- }
-
- T x;
-}
-
-class B extends A<int> {
- B(int x, int z) : super(x, z);
- B.make() : super.make();
- void f(int x) {}
- static int g(int x) {
- return x;
- }
-}
-
-class C {
- C(this.x, int z);
- void f(int x) {}
- static int g(int x) {
- return x;
- }
-
- int x = 0;
-}
-
-typedef void ToVoid<T>(T x);
-typedef T Id<T>(T x);
-
-void main() {
- {
- A<String> a = new A<String>("hello", "world");
- Expect.isTrue(new A<String>.make() is! A<int>);
- Expect.isTrue(new A.make() is A);
- Expect.isTrue(a is! A<int>);
- Expect.isTrue(a is A<String>);
- Expect.isTrue(a.f is ToVoid<String>);
- Expect.isTrue(A.g is Id<String>);
- }
- {
- B b = new B(0, 1);
- Expect.isTrue(new B.make() is B);
- Expect.isTrue(new B.make() is A<int>);
- Expect.isTrue(b is B);
- Expect.isTrue(b.f is ToVoid<int>);
- Expect.isTrue(B.g is Id<int>);
- }
- {
- C c = new C(0, 1);
- Expect.isTrue(c is C);
- Expect.isTrue(c.f is ToVoid<int>);
- Expect.isTrue(C.g is Id<int>);
- }
-}
« no previous file with comments | « tests/language_strong/type_hoisting_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698