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

Unified Diff: tests/language/try_catch_test.dart

Issue 11051031: Add catchless catch clauses (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 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 13236)
+++ tests/language/try_catch_test.dart (working copy)
@@ -123,6 +123,18 @@
Expect.equals(3, e);
}
+ static void test9() {
+ var e = 6;
+ try {
+ throw "up";
+ } on String {
+ e = "s";
+ } on int {
+ e = "i";
+ }
+ Expect.equals("s", e);
+ }
+
static void testMain() {
test1();
test2();
@@ -132,6 +144,7 @@
test6();
test7();
test8();
+ test9();
}
}
« 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