summaryrefslogblamecommitdiff
path: root/test/files/run/macro-expand-tparams-explicit/Impls_1.scala
blob: 72b420d92f5f91cbdad3013e3c05aeb749554fbb (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[U: c.WeakTypeTag](c: Ctx) = {
    import c.universe._
    val U = implicitly[c.WeakTypeTag[U]]
    val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(U.toString))))
    c.Expr[Unit](body)
  }
}