summaryrefslogtreecommitdiff
path: root/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
blob: 34182b79685d71239a59621a2f7bcad138686522 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import scala.reflect.macros.blackbox.Context

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