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

Unified Diff: tests/language/try_catch_test.dart

Issue 63033003: Fix try-catch for sure (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « 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/try_catch_test.dart
===================================================================
--- tests/language/try_catch_test.dart (revision 29984)
+++ tests/language/try_catch_test.dart (working copy)
@@ -138,6 +138,15 @@
Expect.equals("s", e);
}
+ static void test10() {
+ try {
+ throw "up";
+ } on String catch (e) {
+ var e = 1; // ok, shadows exception variable.
+ Expect.equals(1, e);
+ }
+ }
+
static void testMain() {
test1();
test2();
@@ -148,6 +157,7 @@
test7();
test8();
test9();
+ test10();
}
}
« 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