Open
Description
Compiler version
3.2.2
Minimized code
import scala.quoted.*
given staging.Compiler = staging.Compiler.make(getClass.getClassLoader)
def matchIArray = staging.run {
Type.of[IArray[Int]] match
case '[IArray[t]] =>
'{"IArray"}
case _ =>
'{"not IArray"}
end match
}
println(matchIArray)
def matchArray = staging.run {
Type.of[Array[Int]] match
case '[Array[t]] =>
'{"Array"}
case _ =>
'{"not Array"}
end match
}
println(matchArray)
https://scastie.scala-lang.org/rDUMGIiBQ5Km5vxE7TEl1Q
Output
not IArray
Array
Expectation
IArray
Array