summaryrefslogtreecommitdiff
path: root/test/files/run/macro-expand-tparams-prefix-b/Impls_1.scala
blob: 7e0fa26569b9076d70e6de37bdce3903f7c0614d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import scala.reflect.runtime.universe._
import scala.reflect.macros.{Context => Ctx}

object Impls {
  def foo[T: c.AbsTypeTag, U: c.AbsTypeTag](c: Ctx)(x: c.Expr[U]) = {
    import c.universe._
    val T = implicitly[c.AbsTypeTag[T]]
    val U = implicitly[c.AbsTypeTag[U]]
    val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString + " " + U.toString))))
    c.Expr[Unit](body)
  }
}