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

Unified Diff: tests/compiler/dart2js_extra/21351_test.dart

Issue 701793002: Fix a bug in the handling of Phi nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: comments Created 6 years, 1 month 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 | « sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_extra/21351_test.dart
diff --git a/tests/compiler/dart2js_extra/21351_test.dart b/tests/compiler/dart2js_extra/21351_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3f1d00ea05c9f5a6b802e540d93b82146517d72a
--- /dev/null
+++ b/tests/compiler/dart2js_extra/21351_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2014, 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.
+
+class A {
+ bool _flag = false;
+ bool get flag => _flag;
+}
+
+main () {
+ var value1, value2;
+ var count = 0;
+
+ for (var x = 0; x < 10; x++) {
+ var otherThing = new A();
+ for (var dummy = 0; dummy < x; dummy++) {
+ otherThing._flag = !otherThing._flag;
+ }
+
+ value1 = value2;
+ value2 = otherThing;
+
+ if (value1 == null) continue;
+
+ if (value1.flag) count++;
+ }
+
+ if (count == 0) throw "FAIL";
+}
+
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698