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

Unified Diff: lib/compiler/implementation/warnings.dart

Issue 10917070: Disallow legacy try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. 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
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/warnings.dart
diff --git a/lib/compiler/implementation/warnings.dart b/lib/compiler/implementation/warnings.dart
index 4f3a421173646acc25c972a77957784cb359b48d..9dbce9067d380c3e4a2dce4a6cca21cc8621d2b4 100644
--- a/lib/compiler/implementation/warnings.dart
+++ b/lib/compiler/implementation/warnings.dart
@@ -103,9 +103,15 @@ class MessageKind {
static const NO_CATCH_NOR_FINALLY = const MessageKind(
"expected 'catch' or 'finally'");
static const EMPTY_CATCH_DECLARATION = const MessageKind(
- 'expected a variable in catch declaration');
+ 'expected an identifier in catch declaration');
static const EXTRA_CATCH_DECLARATION = const MessageKind(
- 'extra variable in catch declaration');
+ 'extra parameter in catch declaration');
+ static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind(
+ 'cannot use type annotations in catch');
+ static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind(
+ 'cannot use modifiers in catch');
+ static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind(
+ 'cannot use optional parameters in catch');
static const UNBOUND_LABEL = const MessageKind(
'cannot resolve label #{1}');
static const NO_BREAK_TARGET = const MessageKind(
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698