我有一个 quaasiquote 匹配器 where q"someMethod[$ts]()"
where def someMethod[I <: shapeless.HList]()"
。
印刷ts
给出:
List(shapeless.HNil)
或者,例如
List(String, Int)
然后我尝试分配:
val types: List[scala.reflect.api.Types.Type] = ts
导致编译器错误:
[error] type mismatch;
[error] found : List[_125.u.Tree] where val _125: scala.reflect.api.QuasiquoteCompat.TypeAppliedExtractor{val u: OpTreeContext.this.c.universe.type}
[error] required: List[Context.this.c.universe.Type]
如何List[scala.reflect.api.Types.Type]
作曲ts
?