Closed
Description
Minimized code
T.scala:
import scala.quoted._
case class T(t: Type[_])
object T {
def impl[T <: AnyKind](using tt: Type[T])(using Quotes): Expr[Unit] = {
val t = T(tt)
t.t match
case '[x] => println("ok")
case _ => println("not ok :(")
'{}
}
inline def run[T <: AnyKind] = ${ impl[T] }
}
Run.scala:
@main
def run = T.run[List]
Output
not ok :(
Expectation
It is possible to match higher-kinded type in a macro quotation pattern.