Skip to content

No deprecation warnings for type references #9825

Closed
@bishabosha

Description

@bishabosha

Minimized code

object Module {
  @deprecated("Module.Foo is deprecated")
  type Foo[+A] = scala.List[A]
}

object Test {
  val m: Module.Foo[String] = List("wow")
}

Output

// it compiles

Expectation

in scala 2.13.4 we see

Deprecated.scala:7: warning: type Foo in object Module is deprecated: Module.Foo is deprecated
  val m: Module.Foo[String] = List("wow")
                ^
1 warning

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions