typelevel / scala

Typelevel Scala, a fork of Scala
http://typelevel.org/scala/
372 stars 21 forks source link

Test for `<: Singleton` cause spurious tightening of type var bounds #146

Closed milessabin closed 7 years ago

milessabin commented 7 years ago

Reported by @paulp ... minimised test case,

object Test {
  class Covar[-A]

  def foo[A, CC[X] <: Option[X]]: Covar[CC[_ <: A]] = ???

  val bar: Covar[Option[Int]] = foo
}
milessabin commented 7 years ago

Fixed in the next TLS releases.