aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/macro-repl-basic.check
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-06-15 18:19:06 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-06-15 18:19:06 +0200
commit75d5eee8c7f4d83dd64bca989027925e5ff081b6 (patch)
treef03fabc0434f1543bf0420a7602ee5b1ffdeb9ce /tests/disabled/macro/run/macro-repl-basic.check
parenta9863ab9b947180f04fd2302e86a4410dc27934b (diff)
downloaddotty-75d5eee8c7f4d83dd64bca989027925e5ff081b6.tar.gz
dotty-75d5eee8c7f4d83dd64bca989027925e5ff081b6.tar.bz2
dotty-75d5eee8c7f4d83dd64bca989027925e5ff081b6.zip
Move tests that have " macro" or "reify" to disabled.
Diffstat (limited to 'tests/disabled/macro/run/macro-repl-basic.check')
-rw-r--r--tests/disabled/macro/run/macro-repl-basic.check52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/macro-repl-basic.check b/tests/disabled/macro/run/macro-repl-basic.check
new file mode 100644
index 000000000..fab03d155
--- /dev/null
+++ b/tests/disabled/macro/run/macro-repl-basic.check
@@ -0,0 +1,52 @@
+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