summaryrefslogtreecommitdiff
path: root/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala')
-rw-r--r--test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala b/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
new file mode 100644
index 0000000000..3cee65ce72
--- /dev/null
+++ b/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
@@ -0,0 +1,10 @@
+import scala.reflect.makro.{Context => Ctx}
+
+object Impls {
+ def foo[U](c: Ctx)(x: c.Expr[U])(evidence: c.Expr[Numeric[U]]) = {
+ import c.universe._
+ val plusOne = Apply(Select(evidence.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
+ val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(plusOne))
+ Expr[Unit](body)
+ }
+} \ No newline at end of file