Compiler version
3.10.0-RC1-bin-SNAPSHOT - on latest main as of 23 July 2026, commit 7c8ee3cb7e.
Minimized code
abstract class ArrayCloneSeq[A]:
def array: Array[?]
def cloneArray: ArrayCloneSeq[A] =
ArrayCloneSeq.unsafeWrapArray(array.clone()).asInstanceOf[ArrayCloneSeq[A]]
object ArrayCloneSeq:
def unsafeWrapArray[T](array: Array[T]): ArrayCloneSeq[T] =
null.asInstanceOf[ArrayCloneSeq[T]]
Command
sbt -error -no-colors "scala3-bootstrapped/scalac -color:never -Yexplicit-nulls -Wsafe-init -language:experimental.captureChecking -coverage-out target/issue-coverage -sourceroot . -d target/issue-out Repro.scala"
Output
-- [E007] Type Mismatch Error: Repro.scala:5:45 -------------------------------
5 | ArrayCloneSeq.unsafeWrapArray(array.clone()).asInstanceOf[ArrayCloneSeq[A]]
| ^
| Found: (array$1 : Array[?]^{})
| Required: Array[?1.T^'s1]
|
| The error occurred for a synthesized tree: array$1
|
| where: ?1 is an unknown value of type Array[?]^'s2
|
| longer explanation available when compiling with `-explain`
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, matching the no-coverage compile of the same source.
Notes
Is a blocker to enable coverage on the standard library.
Compiler version
3.10.0-RC1-bin-SNAPSHOT- on latestmainas of 23 July 2026, commit7c8ee3cb7e.Minimized code
Command
sbt -error -no-colors "scala3-bootstrapped/scalac -color:never -Yexplicit-nulls -Wsafe-init -language:experimental.captureChecking -coverage-out target/issue-coverage -sourceroot . -d target/issue-out Repro.scala"Output
Expectation
Compilation succeeds with coverage instrumentation, matching the no-coverage compile of the same source.
Notes
Is a blocker to enable coverage on the standard library.