-
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
No deprecation warnings for type references #9825
Comments
deprecation checks are currently done in refchecks, but it will never see the alias // with -Xprint:firstTransform
package <empty> {
final lazy module val Module: Module$ = new Module$()
@scala.annotation.internal.SourceFile("tests/neg/i9825.scala") final module
class
Module$() extends Object() {
private def writeReplace(): AnyRef =
new scala.runtime.ModuleSerializationProxy(classOf[Module.type])
@deprecated("Module.Foo is deprecated",
deprecated.$lessinit$greater$default$2
) type Foo = List
}
final lazy module val Test: Test$ = new Test$()
@scala.annotation.internal.SourceFile("tests/neg/i9825.scala") final module
class
Test$() extends Object() {
private def writeReplace(): AnyRef =
new scala.runtime.ModuleSerializationProxy(classOf[Test.type])
val m: List[String] = List.apply[String](["wow" : String]:String*)
}
} |
In some situation we don't dealias type applications because it changes type inference, you could try expanding that set of conditions to include situations where the type has annotations: |
@smarter that doesn't take into account type aliases without arguments, such as |
I don't know why those get dealiased at that point. |
yes that was my mistake, it seems that the type of a Type tree referencing |
Maybe it's implied, but is it expected to see the deprecation warning even when not using |
This got fixed by moving deprecation checks before FirstTransform in #17301 |
Minimized code
Output
// it compiles
Expectation
in scala 2.13.4 we see
The text was updated successfully, but these errors were encountered: