Closed
Description
I was testing the new coverage support for scala3 with:
The latest version of sbt-scoverage
https://github.com/scoverage/sbt-scoverage/tree/V2
with https://github.com/scoverage/sbt-scoverage/blob/V2/src/main/scala/scoverage/ScoverageSbtPlugin.scala#L162 set to 3.2.0-RC1-bin-SNAPSHOT
This call crashes with the instrumented code:
Compiler version
latest (main branch)
Minimized code
import java.nio.file._
import java.io.File
extension (v: Int) {
def save(): File = {
Files.createTempDirectory("porc-epic").toFile
}
}
1.save()
Output (click arrow to expand)
java.lang.ClassCastException: class scala.collection.immutable.ArraySeq$ofRef cannot be cast to class [Ljava.nio.file.attribute.FileAttribute; (scala.collection.immutable.ArraySeq$ofRef is in unnamed module of loader sbt.internal.ScalaLibraryClassLoader @53bcaacb; [Ljava.nio.file.attribute.FileAttribute; is in module java.base of loader 'bootstrap')
at porcEpic.Visualization$package$.save(Visualization.scala:61)
at porcEpic.unit.VisualizationTest.$init$$$anonfun$2(VisualizationTest.scala:91)