-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcgood first issuePerfect for someone who wants to get started contributingPerfect for someone who wants to get started contributingitype:bug
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.
Metadata
Metadata
Assignees
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcgood first issuePerfect for someone who wants to get started contributingPerfect for someone who wants to get started contributingitype:bug