I have the following code:
@compileTimeOnly("enable macro paradise to expand macro annotations")
class typedTable[T] extends StaticAnnotation {
def macroTransform(annottees: Any*): Table = macro TableGenerator.impl[T]
}
object TableGenerator {
def impl[T](c: whitebox.Context)(annottees: c.Expr[Any]*): c.Expr[Table] = {
import c.universe._
val tpe = weakTypeOf[T] // This doesn't work
...
}
}
And I can't seem to figure out how to access the TypeTag for 'T' in a Macro Annotation. I've seen other posts that make vague reference to how it can be accessed but I can't seem to figure out exactly how I'm supposed to access it in this context.