diff options
Diffstat (limited to 'test/pending/run/macro-expand-named/Impls_1.scala')
-rw-r--r-- | test/pending/run/macro-expand-named/Impls_1.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/pending/run/macro-expand-named/Impls_1.scala b/test/pending/run/macro-expand-named/Impls_1.scala new file mode 100644 index 0000000000..fefe8fc4e2 --- /dev/null +++ b/test/pending/run/macro-expand-named/Impls_1.scala @@ -0,0 +1,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) + } +} |