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

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

Issue 23450044: Update dart2js parser to disallow repeated comparisons and prefix +. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated test expectations and error messages. Created 7 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 | « sdk/lib/_internal/compiler/implementation/scanner/token.dart ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 75f36f38c129567970475d49007a8482c4cb69a0..f88863ca6159fcb4e045f3e030d7f3bf8be0985b 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -815,7 +815,7 @@ main() => foo(1);
"removing the 'const' modifier.",
examples: const ["""
void main() {
- const c; // This constant variable must be initialized.
+ const c; // This constant variable must be initialized.
}"""]);
static const MessageKind MEMBER_USES_CLASS_NAME = const MessageKind(
@@ -915,6 +915,11 @@ Error: "#{value}" is not a valid Symbol name because is not:
'Error: "!==" is not an operator. '
'Did you mean "#{lhs} != #{rhs}" or "!identical(#{lhs}, #{rhs})"?');
+ static const MessageKind UNSUPPORTED_PREFIX_PLUS = const MessageKind(
+ "Error: '+' is not a prefix operator. ",
+ howToFix: "Try removing '+'.",
+ examples: const [ "+2 // No longer a valid way to write '2'" ]);
+
static const MessageKind UNSUPPORTED_THROW_WITHOUT_EXP = const MessageKind(
'Error: No expression after "throw". '
'Did you mean "rethrow"?');
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/scanner/token.dart ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698