Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Use FutureOr. #27

Merged
merged 4 commits into from
Feb 15, 2017
Merged

Use FutureOr. #27

merged 4 commits into from
Feb 15, 2017

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Feb 14, 2017

@nex3 nex3 requested a review from lrhn February 14, 2017 22:15
Closes #26
@@ -27,7 +27,7 @@ class DelegatingFuture<T> implements Future<T> {
Future<T> catchError(Function onError, {bool test(Object error)}) =>
_future.catchError(onError, test: test);

Future/*<S>*/ then/*<S>*/(dynamic onValue(T value), {Function onError}) =>
Future/*<S>*/ then/*<S>*/(FutureOr/*<S>*/ onValue(T value), {Function onError}) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well use full generic method syntax, too – right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lasse has a separate CL out for that.

Copy link
Contributor

@lrhn lrhn Feb 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have landed that now, so you can update the one on FutureOr.
Hmm, I can do that directly in github. Clever. Done :)

@lrhn
Copy link
Contributor

lrhn commented Feb 15, 2017

LGTM

@nex3 nex3 merged commit 4c8f9fb into master Feb 15, 2017
@nex3 nex3 deleted the future-or branch February 15, 2017 22:21
mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 14, 2024
Closes dart-lang/async#26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

Implementations of Future.then should be updated to use FutureOr
4 participants