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
Followup improvements to RefChecks #9815
Conversation
* Only convert unbound existential types to wildcards. * Extend undesired properties check to patterns.
@@ -290,7 +291,7 @@ trait TypeTags { self: Universe => | |||
|
|||
def apply[T](mirror1: scala.reflect.api.Mirror[self.type], tpec1: TypeCreator): TypeTag[T] = { | |||
(mirror1: AnyRef) match { | |||
case m: scala.reflect.runtime.JavaMirrors#MirrorImpl | |||
case m: scala.reflect.runtime.JavaMirrors#JavaMirror @nowarn("cat=deprecation") |
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.
Type projection causes dealias
revealing the deprecated type underneath. The same happens if we use scala.reflect.runtime.JavaMirrors#MirrorImpl
outside of a pattern.
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.
Thank you! Interesting interplay of two type maps :)
Yes, interesting indeed - switching from testing that the existential quantifier is bound from outside vs not bound from inside makes the difference. |
This revealed usages of Java 17 deprecated API
I'll send a follow-up. |
a little sequel to scala#9815, which is responsible for newly and rightly emitting these warnings
not if I beat you to it! #9816 |
Followup to #9806
Fixes scala/bug#12493