Closed
Description
Compiler version
3.1.0
Minimized code
// compile with 2.13.7
import language.existentials
abstract class Box[T]
object Box {
def id(b: Box[Box[x]] forSome { type x }) = b
}
// compile with 3.1.0
@main def test =
val b = Box.id(??? : Box[Box[Int]])
Output
An existential type that came from a Scala-2 classfile cannot be
mapped accurately to to a Scala-3 equivalent.
original type : Box[Box[x]] forSome x
reduces to : Box[Box[x]]
type used instead: Box[Box[Any]]
This choice can cause follow-on type errors or hide type errors.
Proceed at own risk.
longer explanation available when compiling with `-explain`
An existential type that came from a Scala-2 classfile cannot be
mapped accurately to to a Scala-3 equivalent.
original type : Box[Box[x]] forSome x
reduces to : Box[Box[x]]
type used instead: Box[Box[Any]]
This choice can cause follow-on type errors or hide type errors.
Proceed at own risk.
longer explanation available when compiling with `-explain`
Expectation
Mention which classfile is causing the issue.