summaryrefslogtreecommitdiff
path: root/test/files/pos/t8064b/Macro_1.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-18 16:55:15 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-01-08 20:50:08 +0100
commitd744921f855a6c5d4f4df62895bc3b17b8e0e532 (patch)
tree5ab2f9bf09b1f6091bb71c05c99a2cc077f28570 /test/files/pos/t8064b/Macro_1.scala
parentd6b4cda628d43c2c7ede1fbfbffbff7cd62d2919 (diff)
downloadscala-d744921f855a6c5d4f4df62895bc3b17b8e0e532.tar.gz
scala-d744921f855a6c5d4f4df62895bc3b17b8e0e532.tar.bz2
scala-d744921f855a6c5d4f4df62895bc3b17b8e0e532.zip
SI-8064 Automatic position repair for macro expansion
- Replace NoPosition with the focus of the macro application - Focus all range positions, for example, those of spliced arguments
Diffstat (limited to 'test/files/pos/t8064b/Macro_1.scala')
-rw-r--r--test/files/pos/t8064b/Macro_1.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t8064b/Macro_1.scala b/test/files/pos/t8064b/Macro_1.scala
new file mode 100644
index 0000000000..82582356c0
--- /dev/null
+++ b/test/files/pos/t8064b/Macro_1.scala
@@ -0,0 +1,11 @@
+import language.experimental.macros
+import scala.reflect.macros.Context
+
+object Macro {
+ def apply(a: Any): Any = macro impl
+ def impl(c: Context)(a: c.Tree): c.Tree = {
+ import c.universe._
+
+ q"{$a; true}"
+ }
+}