-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Delete dead, name-forcing code - fixing nightlies #13901
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
object Test { | ||
def main(args: Array[String]): Unit = { | ||
assert(123456789.round == 123456789) // error | ||
assert(math.round(123456789) == 123456789) // error | ||
assert(1234567890123456789L.round == 1234567890123456789L) // error | ||
assert(math.round(1234567890123456789L) == 1234567890123456789L) // error | ||
assert(123456789.round == 123456789) // error (Int to Flaot) | ||
assert(math.round(123456789) == 123456789) | ||
assert(1234567890123456789L.round == 1234567890123456789L) // error (Long to Float) | ||
assert(math.round(1234567890123456789L) == 1234567890123456789L) | ||
} | ||
} |
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.
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.
That behavior seems correct.
round
is overloaded, so there is no expected type yet. This seems to indicate that the tests are done in the wrong phase. Maybe we should test this only after Typer?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.
Maybe test
assert(math.round(123456789) == 123456789)
in another test file to test the other error/warning.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.
Yes, the test was correct. I just wanted a pull request ready that we could merge today to unbreak the nightly builds. I spent some time with Lukas and I think we should be able to merge #13911 instead. If something comes up I'll PR moving the test instead.
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.
Ironically, @nicolasstucki, it's thanks to the fact that these were in the same file that we even found that the wrong warning was being emitted. I'm still not sure I like this new "// error" with no message assertion practice that scala 3 has introduced..