-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 eq/ne extension for AnyRef|Null to Scala3RunTime #14632
Conversation
It seems this also needs to wait for an update of the reference compiler for bootstrapping. So I'm splitting it into two PRs: one that adds the extension methods to |
(as suggested in today's LAMP meeting)
This is failing CoverageTests:
@smarter what does this mean? How can I determine whether this is a bug or just that the |
The test is in https://github.com/lampepfl/dotty/blob/main/tests/coverage/pos/Inlined.scala and the expected output in https://github.com/lampepfl/dotty/blob/main/tests/coverage/pos/Inlined.scoverage.check. I assume this is failing just because the line numbers of the assert macro changed, and testCompilation --update-checkfiles will fix it. |
It seems
|
Sorry, the coverage tests are only run with the bootstrapped compiler so you need |
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.
Could you add some documentation comments for these methods? Otherwise LGTM.
|
||
/** Enables an expression of type `T|Null`, where `T` is a subtype of `AnyRef`, to be checked for `null` | ||
* using `eq` and `ne`, rather than only `==` and `!=`. This is needed because `Null` no longer has | ||
* `eq` or `ne` methods, only `==` and `!=` inherited from `Any`. */ |
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.
I think comments need to be on individual methods, not sure if scaladoc/IDEs pick up anything from the extension block.
Addresses part 3 of #14622 .