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

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

Issue 897673003: Implement new return type checking rules in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reformat and sort class members. 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 e5faa78996adcbd367efa2bd98c284b204a6b5f5..e79002b2cfad74fbeb9728078bd76b747b09738b 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -3284,6 +3284,33 @@ class StaticTypeWarningCode extends ErrorCode {
"Map literal requires exactly two type arguments or none, but {0} found");
/**
+ * 9 Functions: It is a static warning if the declared return type of a
+ * function marked async* may not be assigned to Stream.
+ */
+ static const StaticTypeWarningCode ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE =
+ const StaticTypeWarningCode(
+ 'ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE',
+ "Functions marked 'async*' must have a return type assignable to 'Stream'");
+
+ /**
+ * 9 Functions: It is a static warning if the declared return type of a
+ * function marked async may not be assigned to Future.
+ */
+ static const StaticTypeWarningCode ILLEGAL_ASYNC_RETURN_TYPE =
+ const StaticTypeWarningCode(
+ 'ILLEGAL_ASYNC_RETURN_TYPE',
+ "Functions marked 'async' must have a return type assignable to 'Future'");
+
+ /**
+ * 9 Functions: It is a static warning if the declared return type of a
+ * function marked sync* may not be assigned to Iterable.
+ */
+ static const StaticTypeWarningCode ILLEGAL_SYNC_GENERATOR_RETURN_TYPE =
+ const StaticTypeWarningCode(
+ 'ILLEGAL_SYNC_GENERATOR_RETURN_TYPE',
+ "Functions marked 'sync*' must have a return type assignable to 'Iterable'");
+
+ /**
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
* It is a static type warning if <i>T</i> does not have an accessible
* instance setter named <i>v=</i>.
« 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