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

Unified Diff: tests/language/try_catch_syntax_test.dart

Issue 10917070: Disallow legacy try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve testing. Created 8 years, 3 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
Index: tests/language/try_catch_syntax_test.dart
diff --git a/tests/language/try_catch_syntax_test.dart b/tests/language/try_catch_syntax_test.dart
index 03dc9d93d16f9e30016c19af9cdf7ce26d476056..1e712c23400a1226ed3196f30269123df6764320 100644
--- a/tests/language/try_catch_syntax_test.dart
+++ b/tests/language/try_catch_syntax_test.dart
@@ -31,10 +31,17 @@ testIllegalFinally() {
testIllegalCatch() {
try { } catch () { } /// 07: compile-time error
- try { } on MammaMia catch (e) { } /// 09: compile-time error
+ try { } on MammaMia catch (e) { } /// 08: compile-time error
+ try { } catch (var e) { } /// 09: compile-time error
+ try { } catch (final e) { } /// 10: compile-time error
+ try { } catch (int e) { } /// 11: compile-time error
+ try { } catch (final int e) { } /// 12: compile-time error
+ try { } catch ([e, s]) { } /// 13: compile-time error
+ try { } catch (e, [s]) { } /// 14: compile-time error
+ try { } catch (e, [s0, s1]) { } /// 15: compile-time error
}
testIllegalRethrow() {
- try { throw; } catch (e) { } /// 10: compile-time error
- try { } catch (e) { } finally { throw; } /// 11: compile-time error
+ try { throw; } catch (e) { } /// 16: compile-time error
+ try { } catch (e) { } finally { throw; } /// 17: compile-time error
}
« lib/compiler/implementation/resolver.dart ('K') | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698