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 forgotten inheritances around mutable builtin classes #109

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

ytoml
Copy link
Contributor

@ytoml ytoml commented Sep 1, 2022

Fixes #107.

Added superclasses:

  • Ratio! to Int!
  • Int!, Ratio! to Ratio
  • Nat!, Int!, Ratio! to Bool!

Then, we can declare like:

x: Int! = !True
x: Nat! = !True
x: Ratio! = !True

@mtshiba

@mtshiba mtshiba merged commit edf3c5b into erg-lang:main Sep 1, 2022
@mtshiba
Copy link
Member

mtshiba commented Sep 1, 2022

Thank you!

@ytoml ytoml deleted the fix-#107 branch September 1, 2022 09:07
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.

Type inference is wrong for mutable types
2 participants