-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
scala/scala
#6308Closed
Copy link
Description
Discovered by @retronym: scala/scala-java8-compat#97 and minimized to,
trait BaseStream[T, S <: BaseStream[T, S]]
trait Stream[T] extends BaseStream[T, Stream[T]]
trait IntStream extends BaseStream[Integer, IntStream]
sealed trait SS[T, S <: BaseStream[_, S]]
object SSImplicits extends Low {
implicit val IntValue: SS[Int, IntStream] = null
}
trait Low {
implicit def anyStreamShape[T]: SS[T, Stream[T]] = null
}
import SSImplicits.{IntValue, anyStreamShape}
class Test {
implicit def f[A, S <: BaseStream[_, S], CC](a: A)(implicit ss: SS[A, S]): S = ???
// switch these lines and typechecking the body of `def x` fails in 2.13.x
x
y
def x = f(0): IntStream
def y = f[String, Stream[String], Vector[String]]("")
}Identified as a regression caused by scala/scala#6140 ... see scala/scala#6140 (comment).
Reactions are currently unavailable