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

Let union types work well with overloading #333

Open
soutaro opened this issue Mar 16, 2021 · 1 comment
Open

Let union types work well with overloading #333

soutaro opened this issue Mar 16, 2021 · 1 comment
Milestone

Comments

@soutaro
Copy link
Owner

soutaro commented Mar 16, 2021

Union types are not expanded automatically for overloading. This may result in an unexpected type error.

# @type var x: Integer | Float
x = 1
1 + x         # Cannot resolve overloading even `+` is defined for both Integer and Float

Reported in #331.

@soutaro
Copy link
Owner Author

soutaro commented Mar 27, 2021

Related to the code in #332 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant