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

Unified Diff: test/codegen/language/type_hoisting_test.dart

Issue 2033543002: Wire up class hierarchy for recursive inheritance (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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: test/codegen/language/type_hoisting_test.dart
diff --git a/test/codegen/type_hoisting.dart b/test/codegen/language/type_hoisting_test.dart
similarity index 74%
rename from test/codegen/type_hoisting.dart
rename to test/codegen/language/type_hoisting_test.dart
index e26f0f46a530a1d9dd81499fe2aa6c582753c2be..be10662ce1019327bbd03e084320e72025c6e299 100644
--- a/test/codegen/type_hoisting.dart
+++ b/test/codegen/language/type_hoisting_test.dart
@@ -1,4 +1,7 @@
// compile options: --hoist-signature-types --hoist-instance-creation --hoist-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> {
@@ -11,7 +14,7 @@ class A<T> {
class B extends A<int> {
B(int x, int z) : super(x, z);
- B.make();
+ B.make() : super.make();
void f(int x) {}
static int g(int x) {return x;}
}
@@ -28,33 +31,26 @@ typedef T Id<T>(T x);
void main() {
{
A<String> a = new A<String>("hello", "world");
- Expect.isTrue(new A.make<String>() is! A<int>);
- Expect.isTrue(new A.make() is! A<int>);
+ 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.f is! ToVoid<int>);
Expect.isTrue(A.g is Id<String>);
- Expect.isTrue(A.g is! Id<int>);
}
{
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 is! B);
- Expect.isTrue(b.f is! ToVoid<String>);
Expect.isTrue(b.f is ToVoid<int>);
- Expect.isTrue(B.g is! Id<String>);
Expect.isTrue(B.g is Id<int>);
}
{
C c = new C(0, 1);
Expect.isTrue(c is C);
Expect.isTrue(c is! C);
- Expect.isTrue(c.f is! ToVoid<String>);
Expect.isTrue(c.f is ToVoid<int>);
- Expect.isTrue(C.g is! Id<String>);
Expect.isTrue(C.g is Id<int>);
}
}
« no previous file with comments | « test/codegen/language/recursive_inheritance_test.dart ('k') | test/codegen/language/type_no_hoisting_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698