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

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

Issue 1334673002: Add warnings and hints to for-in. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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: 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 b812fd3347de67b9a77f3d1f3e1edeaa5faba1ca..1f162e6992b181b2bf138d4c50ee5c9dfc431d25 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -197,6 +197,7 @@ enum MessageKind {
FACTORY_REDIRECTION_IN_NON_FACTORY,
FINAL_FUNCTION_TYPE_PARAMETER,
FINAL_WITHOUT_INITIALIZER,
+ FORIN_NOT_ASSIGNABLE,
FORMAL_DECLARED_CONST,
FORMAL_DECLARED_STATIC,
FUNCTION_TYPE_FORMAL_WITH_DEFAULT,
@@ -492,6 +493,11 @@ class MessageTemplate {
const MessageTemplate(MessageKind.NOT_ASSIGNABLE,
"'#{fromType}' is not assignable to '#{toType}'."),
+ MessageKind.FORIN_NOT_ASSIGNABLE:
+ const MessageTemplate(MessageKind.FORIN_NOT_ASSIGNABLE,
+ "The element type '#{currentType}' of '#{expressionType}' "
+ "is not assignable to '#{elementType}'."),
+
MessageKind.VOID_EXPRESSION:
const MessageTemplate(MessageKind.VOID_EXPRESSION,
"Expression does not yield a value."),

Powered by Google App Engine
This is Rietveld 408576698