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
chore(compiler): Add fromNumber(<literal>)
warning for short
types
#2024
Merged
ospencer
merged 5 commits into
grain-lang:main
from
spotandjake:spotandjake-improve-fromNumberLiteral-warn
Mar 4, 2024
Merged
chore(compiler): Add fromNumber(<literal>)
warning for short
types
#2024
ospencer
merged 5 commits into
grain-lang:main
from
spotandjake:spotandjake-improve-fromNumberLiteral-warn
Mar 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spotandjake
requested review from
phated,
ospencer,
marcusroberts,
peblair and
jozanza
as code owners
February 14, 2024 03:49
ospencer
reviewed
Feb 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add tests for the short nums?
phated
requested changes
Feb 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing
spotandjake
force-pushed
the
spotandjake-improve-fromNumberLiteral-warn
branch
from
March 3, 2024 01:25
3eb0d70
to
e386d59
Compare
phated
reviewed
Mar 3, 2024
ospencer
approved these changes
Mar 3, 2024
phated
approved these changes
Mar 3, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to a conflict with the base branch
Mar 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr makes the
fromNumber(<literal>)
warning work on all types.On a side note I think we broke the implementation of this check when we added default args and this pr also fixes that issue.
I merged the
FromNumberLiteralXXX
warnings into a single warning. I don't know if we want to make this a breaking change as the warning numbers have changed (I feel like we should consider it as one).closes: #2019