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

Add types to methods with defaults #12837

Merged

Conversation

caspiano
Copy link
Contributor

Adds explicit type signatures to stdlib methods with defaults.

Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

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

Why for the Random namespace you don't follow the pattern arg : EnumType = :value?

@HertzDevil
Copy link
Contributor

Random isn't an enum type, though I wonder if it is beneficial to allow x : Random = :default

@beta-ziliani
Copy link
Member

you mean, add a cast between :constant and Type::Constant?

@beta-ziliani beta-ziliani added this to the 1.7.0 milestone Dec 20, 2022
@straight-shoota straight-shoota merged commit 8674a93 into crystal-lang:master Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants