Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tyarg in flat_map #504

Merged
merged 2 commits into from
Aug 4, 2023
Merged

Remove tyarg in flat_map #504

merged 2 commits into from
Aug 4, 2023

Conversation

yhara
Copy link
Collaborator

@yhara yhara commented Aug 3, 2023

This PR removes the following explicit type argument in Enumerable#flat_map

self.map<Array<R>>(f).fold(Array<R>.new){|sum: Array<R>, item: Array<R>|
        ~~~~~~~~~~

and fixes a type error that prevent this to work.

Once method-wise type arguments are inferred, you need to apply it
to the signature before checking the argument types.
@yhara yhara marked this pull request as ready for review August 4, 2023 03:36
@yhara yhara merged commit 1385606 into main Aug 4, 2023
4 checks passed
@yhara yhara deleted the remove-builtin-tyarg branch August 4, 2023 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant