diff options
Diffstat (limited to 'test/files/pos/t8064b')
-rw-r--r-- | test/files/pos/t8064b/Client_2.scala | 6 | ||||
-rw-r--r-- | test/files/pos/t8064b/Macro_1.scala | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/t8064b/Client_2.scala b/test/files/pos/t8064b/Client_2.scala new file mode 100644 index 0000000000..a7bf2b9fb4 --- /dev/null +++ b/test/files/pos/t8064b/Client_2.scala @@ -0,0 +1,6 @@ +object Test { + Macro { + "".reverse + } +} +// Was: a range position validation error (tree with offset position enclosing tree with range position)
\ No newline at end of file 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}" + } +} |