aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/macro-expand-tparams-implicit/Impls_1.scala
blob: 32cee0d5fbb4a93408916e6c5683d63c154ee78d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import scala.reflect.runtime.universe._
import scala.reflect.macros.blackbox.Context

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