Compiler version
3.8.1-RC1-bin-20251204-241f261-NIGHTLY
Minimized code
import language.experimental.captureChecking
def foo(c: AnyRef^, d: AnyRef^, e: AnyRef^): Unit =
object O:
val x = c
def foo = println(d)
val w: O.type = O // O should not be pure, but O^{c,d}
Output
It's happily accepted by the capture checker.
Expectation
It shouldn't!