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

impl. Type inference of .new #492

Merged
merged 9 commits into from
Jul 7, 2023
Merged

impl. Type inference of .new #492

merged 9 commits into from
Jul 7, 2023

Conversation

yhara
Copy link
Collaborator

@yhara yhara commented Jul 7, 2023

This PR implements two new types of .new calling.

# Call .new on specialized class
Array<Int>.new
# Call .new on generic class (with method tyarg)
Array.new<Int>
# Call .new on generic class (with tyarg inference)
Pair.new(1, true)

fix #483

@yhara yhara marked this pull request as ready for review July 7, 2023 08:57
@yhara yhara merged commit c61a6da into main Jul 7, 2023
@yhara yhara deleted the infer-new2 branch July 7, 2023 09:02
@yhara yhara changed the title Infer new2 impl. Type inference of .new Jul 7, 2023
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.

Support Ok.new(123) for shorthand of Ok<Int>.new(123)
1 participant