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

Unified Diff: sdk/lib/async/future_impl.dart

Issue 1815583002: Add generic annotations to more SDK APIs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | sdk/lib/async/stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/future_impl.dart
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index 8ca10c99c7f55bfedec0ddb23f6445eb4afd45e6..2da3f6e0cb5bb75f97ba6cd1bad705d1831ab028 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -191,7 +191,7 @@ class _Future<T> implements Future<T> {
_resultOrListeners = source;
}
- Future then(f(T value), { Function onError }) {
+ Future/*<S>*/ then/*<S>*/(/*=S*/ f(T value), { Function onError }) {
floitsch 2016/03/18 14:46:02 That's not correct. f is allowed to return S or a
Leaf 2016/03/18 16:20:30 You can instantiate S with Future<S> when f return
floitsch 2016/03/18 16:39:05 I don't think I agree with that type-information.
Leaf 2016/03/18 17:04:43 Assuming that you mean to pass a closure to the fi
Zone currentZone = Zone.current;
if (!identical(currentZone, _ROOT_ZONE)) {
f = currentZone.registerUnaryCallback(f);
« no previous file with comments | « no previous file | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698