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

Unified Diff: tests/language/regress_26948_test.dart

Issue 2188863002: Force local context allocation in finally clauses (fixes #26948). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: work in progress Created 4 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
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/regress_26948_test.dart
diff --git a/tests/language/regress_26948_test.dart b/tests/language/regress_26948_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7e323f77b260932d1fc777a75936dd6d0ac26202
--- /dev/null
+++ b/tests/language/regress_26948_test.dart
@@ -0,0 +1,26 @@
+// 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.
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
+
+import 'dart:async';
+import "package:expect/expect.dart";
+
+void check(Function f) {
+ Expect.isTrue(f());
+}
+
+Future doSync() async {
+ try {
+ await 123;
+ } finally {
+ var next = 5.0;
+ check(() => next == 5.0);
+ }
+}
+
+main() async {
+ for (int i = 0; i < 20; i++) {
+ await doSync();
+ }
+}
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698