diff options
Diffstat (limited to 'tests/pending/run/macro-repl-basic.check')
-rw-r--r-- | tests/pending/run/macro-repl-basic.check | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/tests/pending/run/macro-repl-basic.check b/tests/pending/run/macro-repl-basic.check deleted file mode 100644 index fab03d155..000000000 --- a/tests/pending/run/macro-repl-basic.check +++ /dev/null @@ -1,52 +0,0 @@ -Type in expressions to have them evaluated. -Type :help for more information. - -scala> import language.experimental.macros -import language.experimental.macros - -scala> import scala.reflect.macros.blackbox.Context -import scala.reflect.macros.blackbox.Context - -scala> - -scala> object Impls { - def foo(c: Context)(x: c.Expr[Int]) = { - import c.universe._ - val body = Apply(Select(x.tree, TermName("$plus")), List(Literal(Constant(1)))) - c.Expr[Int](body) - } - - def bar(c: Context)(x: c.Expr[Int]) = { - import c.universe._ - val body = Apply(Select(x.tree, TermName("$plus")), List(Literal(Constant(2)))) - c.Expr[Int](body) - } - - def quux(c: Context)(x: c.Expr[Int]) = { - import c.universe._ - val body = Apply(Select(x.tree, TermName("$plus")), List(Literal(Constant(3)))) - c.Expr[Int](body) - } -} -defined object Impls - -scala> object Macros { - object Shmacros { - def foo(x: Int): Int = macro Impls.foo - } - def bar(x: Int): Int = macro Impls.bar -}; class Macros { - def quux(x: Int): Int = macro Impls.quux -} -defined object Macros -defined class Macros - -scala> - -scala> import Macros.Shmacros._ -import Macros.Shmacros._ - -scala> println(foo(2) + Macros.bar(2) * new Macros().quux(4)) -31 - -scala> :quit |