-
Notifications
You must be signed in to change notification settings - Fork 1.1k
False positive warning: Extension method f will never be selected #22705
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
Comments
@som-snytt I think you made some changes in this, no? |
Thanks, I'll take a look. There have been a couple of tweaks for interactions with opaque types. (By interactions, I mean bugs. The warning must be useful in some way, per the original ticket, but I'll have to refresh my memory about how it is conditioned by opaque types. I remember I commented that the "real desired feature" is a use site warning, where I write IIRC this is not a lint warning, but I tagged it as such. |
Fixes scala#22705 Fixes scala#22706 Fixes scala#22727 Follow-up to scala#22502 by inserting a `dealias` when arriving at `target` type. Refactored the body of `hidden` to make it easier to read. Adjusted the doc for the same reason. As a reminder to self, the original reason for special handling of aliases was due to subclassing, but overrides are excluded. (One could restore that warning for edge cases.) The long doc explaining the handling of leading implicits is moved to the end (as an appendix). Despite best efforts, I was unable to make the doc longer than the code. [Cherry-picked d362492]
Fixes scala#22705 Fixes scala#22706 Fixes scala#22727 Follow-up to scala#22502 by inserting a `dealias` when arriving at `target` type. Refactored the body of `hidden` to make it easier to read. Adjusted the doc for the same reason. As a reminder to self, the original reason for special handling of aliases was due to subclassing, but overrides are excluded. (One could restore that warning for edge cases.) The long doc explaining the handling of leading implicits is moved to the end (as an appendix). Despite best efforts, I was unable to make the doc longer than the code. [Cherry-picked d362492]
Fixes scala#22705 Fixes scala#22706 Fixes scala#22727 Follow-up to scala#22502 by inserting a `dealias` when arriving at `target` type. Refactored the body of `hidden` to make it easier to read. Adjusted the doc for the same reason. As a reminder to self, the original reason for special handling of aliases was due to subclassing, but overrides are excluded. (One could restore that warning for edge cases.) The long doc explaining the handling of leading implicits is moved to the end (as an appendix). Despite best efforts, I was unable to make the doc longer than the code. [Cherry-picked d362492]
Compiler version
3.7.0-RC1-bin-20250228-e592b37-NIGHTLY
Minimized code
Output
Expectation
The warning is wrong, the method is in fact used, as evidenced by the output of the program, which is S, not F. Moreover, the method
f
of the typeNode
cannot be used, as it is hidden inside anopaque type
.The text was updated successfully, but these errors were encountered: