Try to use '{...}
rather than '[...]
x.asType match {
case '[t] => '{tag[t]} match {
case '{type t1 <: S; tag[`t1`]} =>
'{ apply[t] }.asExprOf[Any]
}
// outside macro impl
def tag[A] = ???
In scala 3.6.4, how to call a polymorphic method with type bounds from inside a quoted expression?