-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
area:typeritype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Based on the OpenCB failure in typelevel/fs2
- build logs
Compiler version
Last good release: 3.8.0-RC1-bin-20250915-afbb66b-NIGHTLY
First bad release: 3.8.0-RC1-bin-20250916-eb1bb73-NIGHTLY
Minimized code
abstract class Pull[+F[_], +O, +R]
object Pull:
abstract class Terminal[+R] extends Pull[Nothing, Nothing, R]
class StreamPullOps[F[_], O](self: Pull[F, O, Unit]):
def flatMapOutput[F2[x] >: F[x], O2](): Pull[F2, O2, Unit] =
self match
case r: Terminal[?] => r
case _ => ???
Output
[error] ./test.scala:8:32
[error] Found: (r : Pull[F, O, Unit] & Pull.Terminal[_])
[error] Required: Pull[F2, O2, Unit]
[error]
[error] where: F is a type in class StreamPullOps with bounds <: [_²] =>> Any
[error] F2 is a type in method flatMapOutput with bounds >: [x] =>> F[x] and <: [x] =>> Any
[error] case r: Terminal[?] => r
[error] ^
Error compiling project (Scala 3.8.0-RC1-bin-20250928-b67fcf2-NIGHTLY, JVM (21))
Expectation
Should compile
Metadata
Metadata
Assignees
Labels
area:typeritype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore