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

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

Issue 847613002: Fix issue 21795. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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
« no previous file with comments | « runtime/vm/code_descriptors.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) 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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Regression test for issue 21795.
6
7 foo(t) {
8 try {
9 if (t == 123) throw 42;
10 } finally { }
11 }
12
13 bar() {
14 try {
15 return 42;
16 } finally { }
17 }
18
19
20 class A {
21 test(t) {
22 try {
23 foo(t);
24 } finally {
25 if (t == 0) {
26 try {
27 } catch (err, st) {
28 }
29 }
30 }
31 }
32 }
33
34
35 main() {
36 var a = new A();
37 for (var i=0; i<10000; ++i) a.test(0);
38 try {
39 a.test(123);
40 } catch (e, s) {
41 if (s.toString().indexOf("foo") == -1) {
42 print(s);
43 throw "Expected foo in stacktrace!";
44 }
45 }
46 }
OLDNEW
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698