As your error message states, ts
is a list of trees. More specifically, these will be type trees, and you can extract their types with the tpe
method:
val types: List[scala.reflect.api.Types#Type] = ts.map(_.tpe)
Note that I'm using a type projection, since Types
is neither a package nor an object, so Types.Type
won't work.