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

Support inferring kotlin type from other parameters #3431

Merged
merged 1 commit into from Aug 11, 2022
Merged

Support inferring kotlin type from other parameters #3431

merged 1 commit into from Aug 11, 2022

Conversation

hfhbd
Copy link
Collaborator

@hfhbd hfhbd commented Aug 11, 2022

Fixes #3416

It only infers the Kotlin type, if all other parameters of the function have the same type:
COALESCE(Int, Int, ARG) = > Arg = Int.
So COALESCE(Int, Text, ARG) would result in an error, because the type is ambiguous.

Copy link
Collaborator

@AlecKazakova AlecKazakova left a comment

Choose a reason for hiding this comment

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

very nice

@AlecKazakova AlecKazakova merged commit 7c32c0e into cashapp:master Aug 11, 2022
@hfhbd hfhbd deleted the inferredType branch August 11, 2022 22:15
Copy link
Contributor

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

Delicious 👍

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.

Infer type in COALESCE
3 participants