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

Unified Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 888943004: Implement new "yield*" type checking rules in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index e79002b2cfad74fbeb9728078bd76b747b09738b..7801e2e4a6d8977c44ebbf8dba73f14087a549f6 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -3752,11 +3752,18 @@ class StaticTypeWarningCode extends ErrorCode {
*
* - the body of f is marked sync* and the type Iterable<T> may not be
* assigned to the declared return type of f.
+ *
+ * 17.16.2 Yield-Each: Let T be the static type of e [the expression to the
+ * right of "yield*"] and let f be the immediately enclosing function. It is
+ * a static type warning if T may not be assigned to the declared return type
+ * of f. If f is synchronous it is a static type warning if T may not be
+ * assigned to Iterable. If f is asynchronous it is a static type warning if
+ * T may not be assigned to Stream.
*/
static const StaticTypeWarningCode YIELD_OF_INVALID_TYPE =
const StaticTypeWarningCode(
'YIELD_OF_INVALID_TYPE',
- "The declared return type '{0}' is incompatible with the type '{1}' implied by the 'yield' expression");
+ "The type '{0}' implied by the 'yield' expression must be assignable to '{1}'");
/**
* Initialize a newly created error code to have the given [name]. The message
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698