Closed
Description
Based on OpenCB failure in getkyo/kyo
- build logs
Compiler version
Last good release: 3.5.0-RC1-bin-20240327-c251f36-NIGHTLY
First bad release: 3.5.0-RC1-bin-20240329-c8c3bde-NIGHTLY
Bisect points to 9c80a7c
Minimized code
sealed abstract class Kyo[+T, -S]
opaque type <[+T, -S] >: T = T | Kyo[T, S]
abstract class Effect[+E]:
type Command[_]
case class Recurse[Command[_], Result[_], E <: Effect[E], T, S, S2](
h: ResultHandler[Command, Result, E, S],
v: T < (E & S & S2)
)
abstract class ResultHandler[Command[_], Result[_], E <: Effect[E], S]:
opaque type Handle[T, S2] >: (Result[T] < (S & S2)) = Result[T] < (S & S2) | Recurse[Command, Result, E, T, S, S2]
def handle[T, S2](h: ResultHandler[Command, Result, E, S], v: T < (E & S & S2)): Handle[T, S2] = Recurse(h, v)
Output
Compiling project (Scala 3.5.0-RC1-bin-20240409-2148c8d-NIGHTLY, JVM (17))
[error] ./bisect/test.scala:15:111
[error] Found: (v : T < (E & S & S2))
[error] Required: T < (E & S & S2)
[error]
[error] where: E is a type in class ResultHandler with bounds <: Effect[E]
[error] def handle[T, S2](h: ResultHandler[Command, Result, E, S], v: T < (E & S & S2)): Handle[T, S2] = Recurse(h, v)
[error]
Expectation
Should compile without significant compilation time penalties to optimizations done in #20034