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

Unified Diff: tests/language/while_test.dart

Issue 459763003: dart2dart: Fix a scoping bug in the translation of loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 6 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
« no previous file with comments | « tests/language/for_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/while_test.dart
diff --git a/tests/language/while_test.dart b/tests/language/while_test.dart
index 5263d755dc6f79c1c6aa2e959a6290b5957bcefe..71f3c5d0ba7326273c84cf5e0200831150ae0cc6 100644
--- a/tests/language/while_test.dart
+++ b/tests/language/while_test.dart
@@ -27,6 +27,13 @@ class Helper {
}
return i;
}
+
+ static int f4() {
+ // Verify that side effects in the condition are visible after the loop.
+ int i = 0;
+ while (++i < 3) {}
+ return i;
+ }
}
class WhileTest {
@@ -40,6 +47,7 @@ class WhileTest {
Expect.equals(0, Helper.f3(0));
Expect.equals(1, Helper.f3(1));
Expect.equals(2, Helper.f3(2));
+ Expect.equals(3, Helper.f4());
}
}
« no previous file with comments | « tests/language/for_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698