summaryrefslogblamecommitdiff
path: root/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala
blob: afdd7d4f7a80c02980508f56c1b4af6211aed555 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                       
                                            

              
                                                                                                              

                       
                                                                                                                  
                                                                                                                                             
                                                                                                                   
                             
   
 
import scala.reflect.runtime.universe._
import scala.reflect.macros.{Context => Ctx}

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