We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Welcome to Scala 2.12.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_102). Type in expressions for evaluation. Or try :help. scala> trait InvariantContainer[T0] { | type T = T0 | } defined trait InvariantContainer scala> type OptionalContainer[Container <: InvariantContainer[_]] = InvariantContainer[Option[Container#T]] defined type alias OptionalContainer scala> def expand(x: OptionalContainer[InvariantContainer[Int]]): InvariantContainer[Option[InvariantContainer[Int]#T]] = x <console>:13: error: type mismatch; found : OptionalContainer[InvariantContainer[Int]] (which expands to) InvariantContainer[Option[_$1]] required: InvariantContainer[Option[Int]] def expand(x: OptionalContainer[InvariantContainer[Int]]): InvariantContainer[Option[InvariantContainer[Int]#T]] = x ^ scala> def expand(x: OptionalContainer[InvariantContainer[Int]]): InvariantContainer[Option[Int]] = x <console>:13: error: type mismatch; found : OptionalContainer[InvariantContainer[Int]] (which expands to) InvariantContainer[Option[_$1]] required: InvariantContainer[Option[Int]] def expand(x: OptionalContainer[InvariantContainer[Int]]): InvariantContainer[Option[Int]] = x ^
I expect that scalac does not error here, because T is a concrete type, which should be expanded immediately.
T
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-10038?orig=1 Reporter: @Atry Affected Versions: 2.12.0
Sorry, something went wrong.
No branches or pull requests
I expect that scalac does not error here, because
T
is a concrete type, which should be expanded immediately.The text was updated successfully, but these errors were encountered: