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

Allow implicit int to float conversion. #2887

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Allow implicit int to float conversion. #2887

wants to merge 6 commits into from

Conversation

smimram
Copy link
Member

@smimram smimram commented Feb 9, 2023

This will allow users to use an int where a float is expected. For instance:

def double(x) = 2. * x end
ten = double(5)

@smimram smimram requested a review from toots February 9, 2023 12:53
Copy link
Member

@toots toots left a comment

Choose a reason for hiding this comment

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

I'm sure this will help users a lot! I added some tests. It'd be nice to document that this cannot solve all situations.

src/lang/types/ground_type.ml Show resolved Hide resolved
@smimram
Copy link
Member Author

smimram commented Feb 15, 2023

@toots can I proceed with the merge? I think that you mentioned having some more comments...

@toots
Copy link
Member

toots commented Feb 16, 2023

I think that some doc would be nice otherwise this is good to go on my end.

@smimram smimram enabled auto-merge (squash) February 26, 2023 11:41
auto-merge was automatically disabled June 1, 2023 15:46

Merge queue setting changed

@toots
Copy link
Member

toots commented Jul 16, 2024

@smimram do you still want to include that in 2.3.0?

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.

2 participants