aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t7617a/Macros_1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pending/run/t7617a/Macros_1.scala')
-rw-r--r--tests/pending/run/t7617a/Macros_1.scala22
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/pending/run/t7617a/Macros_1.scala b/tests/pending/run/t7617a/Macros_1.scala
deleted file mode 100644
index 77b18c20e..000000000
--- a/tests/pending/run/t7617a/Macros_1.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-import scala.reflect.macros.blackbox.Context
-import language.experimental.macros
-
-object Macros {
- def getValueImpl[T](c: Context): c.Expr[T] = {
- import c.universe._
- c.Expr[T](Apply(Select(c.prefix.tree, newTermName("getVal")), Nil))
- }
- def setValueImpl[T](c: Context)(value: c.Expr[T]): c.Expr[Unit] = {
- import c.universe._
- c.Expr[Unit](Apply(Select(c.prefix.tree, newTermName("setVal")), List(value.tree)))
- }
-}
-
-object Module {
- private var _val: String = "hello"
- def setVal(value: String): Unit = this._val = value
- def getVal(): String = this._val
-
- def value: String = macro Macros.getValueImpl[String]
- def value_=(value: String): Unit = macro Macros.setValueImpl[String]
-}