summaryrefslogtreecommitdiff
path: root/test/files/run/macro-expand-multiple-arglists/Impls_1.scala
blob: ae1c50eacede940d4982ffd01ca0493f4c8cd152 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import scala.reflect.makro.{Context => Ctx}

object Impls {
  def foo(c: Ctx)(x: c.Expr[Int])(y: c.Expr[Int]) = {
    import c.mirror._
    val sum = Apply(Select(x.tree, newTermName("$minus")), List(y.tree))
    val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(sum))
    Expr[Unit](body)
  }
}