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

Side by Side Diff: tests/language/vm/optimized_await_regress_test.dart

Issue 653073002: Fix bug with captured parameters and optimized try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/flow_graph_compiler.cc ('K') | « runtime/vm/scopes.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // VMOptions=--enable_async --optimization-counter-threshold=10
6
srdjan 2014/10/14 13:45:09 Maybe add a brief description why the test is need
Florian Schneider 2014/10/14 14:44:01 Done.
7 import 'package:expect/expect.dart';
8
9 import 'dart:async';
10
11 check(value) {
12 try {
13 } finally {
14 return value;
15 }
16 }
17
18 fail() {
19 try {
20 Expect.isTrue(false);
21 } finally { }
22 }
23
24 foo(i) async {
25 var k = await 77;
26 var a = "abc${k}";
27 if (a != "abc77") fail();
28 return k;
29 }
30
31
32 main() {
33 for (int i = 0; i < 20; i++) {
34 foo(i).then((value) => Expect.equals(77, value));
35 }
36 }
OLDNEW
« runtime/vm/flow_graph_compiler.cc ('K') | « runtime/vm/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698