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: test/codegen/try_catch.dart

Issue 1036333003: Fix try catch crasher bug due to null else case. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: ptal Created 5 years, 8 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 | « test/codegen/expect/try_catch.js ('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
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 foo() { 5 foo() {
6 try { 6 try {
7 throw "hi there"; 7 throw "hi there";
8 } on String catch (e, t) { 8 } on String catch (e, t) {
9 } catch (e, t) { 9 } catch (e, t) {
10 rethrow; 10 rethrow;
11 } 11 }
12 } 12 }
13
13 bar() { 14 bar() {
14 try { 15 try {
15 throw "hi there"; 16 throw "hi there";
16 } catch (e, t) { 17 } catch (e, t) {
17 } on String catch (e, t) { 18 } on String catch (e, t) {
18 // unreachable 19 // unreachable
19 rethrow; 20 rethrow;
20 } 21 }
21 } 22 }
23
24 baz() {
25 try {
26 throw "finally only";
27 } finally {
28 return true;
29 }
30 }
31
32 qux() {
33 try {
34 throw "on only";
35 } on String catch (e, t) {
36 // unreachable
37 rethrow;
38 }
39 }
40
22 main() { 41 main() {
23 foo(); 42 foo();
24 bar(); 43 bar();
44 baz();
45 qux();
25 } 46 }
OLDNEW
« no previous file with comments | « test/codegen/expect/try_catch.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698