blob: 9b1dd8e017b73fbd2253260aaed96c4f37685965 (
plain) (
tree)
|
|
import scala.reflect.runtime.universe._
import scala.reflect.makro.Context
object Macros {
def impl[T: c.TypeTag](c: Context)(foo: c.Expr[T]): c.Expr[Unit] = c.reify { println(c.literal(implicitly[c.TypeTag[T]].toString).splice) }
def foo[T](foo: T) = macro impl[T]
}
|