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

Unified Diff: tests/language_strong/type_propagation_test.dart

Issue 3007803002: Migrate block 162 to Dart 2.0.
Patch Set: Created 3 years, 4 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_strong/type_propagation_test.dart
diff --git a/tests/language_strong/type_propagation_test.dart b/tests/language_strong/type_propagation_test.dart
deleted file mode 100644
index 53501f14ee343d9d35c9b3ff62f45b4e4a69a630..0000000000000000000000000000000000000000
--- a/tests/language_strong/type_propagation_test.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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.
-
-// dart2js used to have an infinite loop in its type propagation
-// algorithm due to types becoming broader instead of narrower.
-
-import "package:expect/expect.dart";
-
-class A {
- resolveSend(node) {
- if (node == null) {
- return [new B()][0];
- } else {
- return [new B(), new A()][1];
- }
- }
-
- visitSend(node) {
- var target = resolveSend(node);
-
- if (false) {
- if (false) {
- target = target.getter;
- if (false) {
- target = new Object();
- }
- }
- }
- return true ? target : null;
- }
-}
-
-var a = 43;
-
-class B {
- var getter = a == 42 ? new A() : null;
-}
-
-main() {
- Expect.isTrue(new A().visitSend(new A()) is A);
- Expect.isTrue(new A().visitSend(null) is B);
-}

Powered by Google App Engine
This is Rietveld 408576698