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

Unified Diff: pkg/compiler/lib/src/diagnostics/messages.dart

Issue 1504403005: Add missing compile-time errors for async/await. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix after rebase Created 5 years 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 | « pkg/compiler/lib/src/diagnostics/dart2js_messages.dart ('k') | pkg/compiler/lib/src/parser/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/diagnostics/messages.dart
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 05ab9e3e0b8c953de94154fc4b80b6fd2208831e..200b63f1282acb52fe181715a218c4f4204fcfe8 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -186,7 +186,9 @@ enum MessageKind {
INTERNAL_LIBRARY,
INTERNAL_LIBRARY_FROM,
INVALID_ARGUMENT_AFTER_NAMED,
+ INVALID_AWAIT,
INVALID_AWAIT_FOR,
+ INVALID_AWAIT_FOR_IN,
INVALID_BREAK,
INVALID_CASE_DEFAULT,
INVALID_CONSTRUCTOR_ARGUMENTS,
@@ -219,6 +221,7 @@ enum MessageKind {
INVALID_UNNAMED_CONSTRUCTOR_NAME,
INVALID_URI,
INVALID_USE_OF_SUPER,
+ INVALID_YIELD,
JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS,
JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
@@ -603,7 +606,9 @@ const _KIND_TO_STRING_MAP = const <MessageKind, String>{
MessageKind.INTERNAL_LIBRARY: "INTERNAL_LIBRARY",
MessageKind.INTERNAL_LIBRARY_FROM: "INTERNAL_LIBRARY_FROM",
MessageKind.INVALID_ARGUMENT_AFTER_NAMED: "INVALID_ARGUMENT_AFTER_NAMED",
+ MessageKind.INVALID_AWAIT: "INVALID_AWAIT",
MessageKind.INVALID_AWAIT_FOR: "INVALID_AWAIT_FOR",
+ MessageKind.INVALID_AWAIT_FOR_IN: "INVALID_AWAIT_FOR_IN",
MessageKind.INVALID_BREAK: "INVALID_BREAK",
MessageKind.INVALID_CASE_DEFAULT: "INVALID_CASE_DEFAULT",
MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS: "INVALID_CONSTRUCTOR_ARGUMENTS",
@@ -642,6 +647,7 @@ const _KIND_TO_STRING_MAP = const <MessageKind, String>{
"INVALID_UNNAMED_CONSTRUCTOR_NAME",
MessageKind.INVALID_URI: "INVALID_URI",
MessageKind.INVALID_USE_OF_SUPER: "INVALID_USE_OF_SUPER",
+ MessageKind.INVALID_YIELD: "INVALID_YIELD",
MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS:
"JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS",
MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER:
@@ -911,6 +917,9 @@ class MessageTemplate {
Map<MessageKind, MessageTemplate> result = <MessageKind, MessageTemplate>{};
for (MessageKind kind in MessageKind.values) {
String name = _KIND_TO_STRING_MAP[kind];
+ if (name == null) {
+ throw new ArgumentError("No mapping for $kind in _KIND_TO_STRING_MAP");
+ }
Map data =
shared_messages.MESSAGES[name] ?? dart2js_messages.MESSAGES[name];
if (data == null) throw new ArgumentError.value(name);
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/dart2js_messages.dart ('k') | pkg/compiler/lib/src/parser/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698