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

Side by Side Diff: tests/language/regress_26530_test.dart

Issue 2075813003: Allow rethrow in nested try statements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/vm/parser.cc ('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) 2016, 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 import "package:expect/expect.dart";
6
7 var trace = "";
8
9 main() {
10 var x = 0;
11 try {
12 try {
13 throw x++; // 1
14 } on int catch (e) {
15 trace += "$e";
16 trace += "-$x";
17 x++; // 2
18 try {
19 x++; // 3
20 rethrow;
21 } finally {
22 trace += "-f";
23 x++; // 4
24 }
25 }
26 } catch (e) {
27 trace += "-c";
28 trace += "-$e";
29 trace += "-$x";
30 }
31 Expect.equals("0-1-f-c-0-4", trace);
32 }
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698