diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-09 13:43:32 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-09 13:43:32 -0800 |
commit | e089cafb5fd02e2457bafde3252da3a771d3180e (patch) | |
tree | e4f54289554e90fcc24218a58e9c2fbd3d93a713 /test/files/pos/t8064b | |
parent | 572b092495ebf1075064d90d7b9bbc90dec2ac76 (diff) | |
parent | 94eb751d0063b80e7bca542b9c243900527f9028 (diff) | |
download | scala-e089cafb5fd02e2457bafde3252da3a771d3180e.tar.gz scala-e089cafb5fd02e2457bafde3252da3a771d3180e.tar.bz2 scala-e089cafb5fd02e2457bafde3252da3a771d3180e.zip |
Merge pull request #3342 from xeno-by/topic/pres-compiler-macros
Presentation compiler friendliness for macros
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}" + } +} |