Compiler version
3.10.0-RC1-bin-SNAPSHOT - on latest main as of 6 August 2026, commit 266b5b3afe.
Minimized code
import language.experimental.captureChecking
class Repro { self: Repro^ =>
def coll: this.type = this
def withFilter(p: Any^): WithFilter^{this, p} =
new WithFilter(coll, p)
}
class WithFilter(val source: Repro^, val predicate: Any^)
Command
sbt -error -no-colors "scala3-bootstrapped/scalac -color:never -language:experimental.captureChecking -coverage-out target/issue-coverage -sourceroot . -d target/issue-out Repro.scala"
Output
-- [E007] Type Mismatch Error: Repro.scala:7:4 -------------------------------
7 | new WithFilter(coll, p)
| ^^^^^^^^^^^^^^^^^^^^^^^
| Found: WithFilter{
| val source: (Repro.this.coll : -> (Repro.this : Repro^{any}));
| val predicate: (p : Any^)
| }^{any, p}
| Required: WithFilter^{Repro.this, p}
|
| Note that capability `any` cannot flow into capture set {Repro.this, p}.
1 error found
[error] nonzero exit code returned from runner: 1
[error] (scala3-compiler-bootstrapped / Compile / runMain) nonzero exit code returned from runner: 1
Expectation
Compilation succeeds with coverage instrumentation.
Notes
Is a blocker for scoverage to work with stdlib.
Compiler version
3.10.0-RC1-bin-SNAPSHOT- on latestmainas of 6 August 2026, commit266b5b3afe.Minimized code
Command
sbt -error -no-colors "scala3-bootstrapped/scalac -color:never -language:experimental.captureChecking -coverage-out target/issue-coverage -sourceroot . -d target/issue-out Repro.scala"Output
Expectation
Compilation succeeds with coverage instrumentation.
Notes
Is a blocker for scoverage to work with stdlib.