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

Unified Diff: CHANGELOG.md

Issue 2859703004: Re-remove ad hoc Future.then inference. (Closed)
Patch Set: rebase Created 3 years, 7 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/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: CHANGELOG.md
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca9c9438e0313f2e116baf9192d94633d6ea31db..fbf02d27bd4aff312e516364326fe4fb79be1cb9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,17 @@
#### Strong Mode
+* Removed ad hoc Future.then inference in favor of using FutureOr. Prior to
+adding FutureOr to the language, the analyzer implented an ad hoc type inference
+for Future.then (and overrides) treating it as if the onValue callback was typed
+to return FutureOr for the purposes of inference. This ad hoc inference has
+been removed now that FutureOr has been added.
+
+Packages that implement `Future` must either type the `onValue` parameter to
+`.then` as returning `FutureOr<T>`, or else must leave the type of the parameter
+entirely to allow inference to fill in the type.
+
+
### Core library changes
* `dart:io`
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698