Skip to content

Fix type inference issue with uncurried functions applied to a single… #5970

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

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

cristianoc
Copy link
Collaborator

@cristianoc cristianoc commented Feb 3, 2023

… unit argument.

In the example

@@uncurried

let foo = func => func() + 1

the type inferred for func was the return type int instead of the type unit => int because the application () was omitted, as the heuristic for application of a function with only optional args would mistakenly fire.

… unit argument.

In the example the inferred for `func()` was the return type `int` instead of the type `unit => int` because the application `()` was omitted, as the heuristic for application of a function with only optional args would mistakenly fire.
@cristianoc cristianoc force-pushed the fix_type_inference_unit_arg branch from 3c75891 to 0fa059f Compare February 3, 2023 08:58
@cristianoc cristianoc merged commit 7588666 into master Feb 3, 2023
@cristianoc cristianoc deleted the fix_type_inference_unit_arg branch February 3, 2023 09:11
@cristianoc cristianoc mentioned this pull request Feb 3, 2023
15 tasks
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