Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Don't parse Int token with suffices as hash ident for poly variants #408

Merged
merged 5 commits into from
May 13, 2021

Conversation

IwanKaramazow
Copy link
Contributor

#10s should not be accepted as a numeric polyvariant identifier.

Fixes #407

`#10s` should not be accepted as a numeric polyvariant identifier.

Fixes #407
@bobzhang
Copy link
Member

maybe a good time to turn on warning 9 to avoid it in the future?

@IwanKaramazow
Copy link
Contributor Author

Yes, thanks for the suggestion, will do!

@IwanKaramazow IwanKaramazow mentioned this pull request May 13, 2021
2 │
3 │ type t = [ #red | #10s ]

A numeric polymorphic variant cannot be followed by a letter. Did you mean `#10`?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bloodyowl what do you think of this new message? Specialized it to give a clear suggestion on what the user could do in this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup, that looks better 👍

@IwanKaramazow IwanKaramazow merged commit dc53370 into master May 13, 2021
@IwanKaramazow IwanKaramazow deleted the GH407 branch May 13, 2021 07:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nulary polymrophic variants starting with leading number are compiled to numbers
3 participants