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

Change signature of methods overriding Future.then #7

Merged
merged 3 commits into from
Oct 21, 2016

Conversation

natebosch
Copy link
Contributor

@natebosch natebosch commented Oct 21, 2016

The signature is:
Future<T>.then (<S>((T) → dynamic, {onError: Function}) → Future<S>)

Use dynamic rather than leave off the type to future proof against
--no-implicit-dynamic

cleanup: dartfmt

The signature is:
Future<T>.then (<S>((T) → dynamic, {onError: Function}) → Future<S>)

Use `dynamic` rather than leave off the type to future proof against
--no-implicit-dynamic

cleanup: dartfmt
@natebosch
Copy link
Contributor Author

This will help with dart-archive/bazel#40

@nex3 nex3 assigned nex3 and unassigned jmesserly Oct 21, 2016
@nex3
Copy link
Contributor

nex3 commented Oct 21, 2016

Please remove dartfmt changes—this package doesn't use the formatter.


Future/*<S>*/ then/*<S>*/(/*=S*/ onValue(T value), {Function onError}) =>
_future.then(onValue, onError: onError);
Future/*<S>*/ then/*<S>*/(dynamic 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.

What SDK version did this change in? We should set the minimum SDK constraint to that version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like this particular bit changed in 1.19

Copy link
Contributor

@nex3 nex3 left a comment

Choose a reason for hiding this comment

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

LGTM!

@natebosch natebosch merged commit 302cafc into dart-archive:master Oct 21, 2016
@natebosch natebosch deleted the strong-mode-fixes branch October 21, 2016 23:00
@nex3
Copy link
Contributor

nex3 commented Oct 21, 2016

Can you publish this or should I?

@natebosch
Copy link
Contributor Author

Sorry meant to ping you about that right after I merged and then I got distracted.

If you grant me uploader permission I can publish and tag it, otherwise if you want to publish that works too.

mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 14, 2024
)

The signature is:
Future<T>.then (<S>((T) → dynamic, {onError: Function}) → Future<S>)

Use `dynamic` rather than leave off the type to future proof against
--no-implicit-dynamic

Constrain SDK to version which includes this signature for Future
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.

4 participants