| 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 a750c41d2d09f27222f02d18b4ec7831d8a80ef4..796e8336c49db8c14278071c840c5ad9f22d5a34 100644
|
| --- a/pkg/compiler/lib/src/diagnostics/messages.dart
|
| +++ b/pkg/compiler/lib/src/diagnostics/messages.dart
|
| @@ -44,6 +44,7 @@ enum MessageKind {
|
| ASYNC_MODIFIER_ON_ABSTRACT_METHOD,
|
| ASYNC_MODIFIER_ON_CONSTRUCTOR,
|
| ASYNC_MODIFIER_ON_SETTER,
|
| + AWAIT_FORIN_VOID_GENERIC,
|
| AWAIT_MEMBER_NOT_FOUND,
|
| AWAIT_MEMBER_NOT_FOUND_IN_CLOSURE,
|
| BAD_INPUT_CHARACTER,
|
| @@ -153,6 +154,7 @@ enum MessageKind {
|
| FINAL_FUNCTION_TYPE_PARAMETER,
|
| FINAL_WITHOUT_INITIALIZER,
|
| FORIN_NOT_ASSIGNABLE,
|
| + FORIN_VOID_GENERIC,
|
| FORMAL_DECLARED_CONST,
|
| FORMAL_DECLARED_STATIC,
|
| FUNCTION_TYPE_FORMAL_WITH_DEFAULT,
|
| @@ -474,6 +476,18 @@ class MessageTemplate {
|
| MessageKind.VOID_VARIABLE: const MessageTemplate(
|
| MessageKind.VOID_VARIABLE, "Variable cannot be of type void."),
|
|
|
| + MessageKind.FORIN_VOID_GENERIC: const MessageTemplate(
|
| + MessageKind.FORIN_VOID_GENERIC,
|
| + "Generic type of Iterable cannot be of type void.",
|
| + examples: const [
|
| + """
|
| +main() {
|
| + for (var x in new List<void>()) {
|
| + }
|
| +}
|
| +"""
|
| + ]),
|
| +
|
| MessageKind.RETURN_VALUE_IN_VOID: const MessageTemplate(
|
| MessageKind.RETURN_VALUE_IN_VOID,
|
| "Cannot return value from void function."),
|
| @@ -493,6 +507,19 @@ class MessageTemplate {
|
| MessageKind.NAMED_ARGUMENT_NOT_FOUND,
|
| "No named argument '#{argumentName}' found on method."),
|
|
|
| + MessageKind.AWAIT_FORIN_VOID_GENERIC: const MessageTemplate(
|
| + MessageKind.AWAIT_FORIN_VOID_GENERIC,
|
| + "Generic type of Stream cannot be of type void.",
|
| + examples: const [
|
| + """
|
| +import 'dart:async';
|
| +main() async {
|
| + await for (var x in new StreamView<void>(null)) {
|
| + }
|
| +}
|
| +"""
|
| + ]),
|
| +
|
| MessageKind.AWAIT_MEMBER_NOT_FOUND: const MessageTemplate(
|
| MessageKind.AWAIT_MEMBER_NOT_FOUND,
|
| "No member named 'await' in class '#{className}'.",
|
|
|