summaryrefslogtreecommitdiff
path: root/test/files/neg/macro-exception/Macros_1.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-07-30 11:37:59 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-08-10 16:40:13 +0200
commit5626c7403e44380c6e3610cae8f68f3d2b52eb70 (patch)
tree582a15327326ccbfab534cf26c2598687e2eabad /test/files/neg/macro-exception/Macros_1.scala
parented5c1abbfca18a880c79048cc7e9578ae932101d (diff)
downloadscala-5626c7403e44380c6e3610cae8f68f3d2b52eb70.tar.gz
scala-5626c7403e44380c6e3610cae8f68f3d2b52eb70.tar.bz2
scala-5626c7403e44380c6e3610cae8f68f3d2b52eb70.zip
[nomaster] macro errors now always have positions
Back then when I implemented macros for inclusion in trunk (Spring 2012), partest didn't support the _1, _2, ... convention for neg tests, so I had to use toolboxes to test macro-generated exceptions. Unfortunately toolboxes aren't very good with positions (mostly because their inputs are almost always constructed without corresponding sources) so I didn't notice that errors signalizing about macro-generated exceptions actually don't carry positions with them because of a typo. This patch fixes the oversight, but it doesn't need to be ported to master, because over there everything's already fixed by one of the backports from macro paradise.
Diffstat (limited to 'test/files/neg/macro-exception/Macros_1.scala')
-rw-r--r--test/files/neg/macro-exception/Macros_1.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/macro-exception/Macros_1.scala b/test/files/neg/macro-exception/Macros_1.scala
new file mode 100644
index 0000000000..60e4020aec
--- /dev/null
+++ b/test/files/neg/macro-exception/Macros_1.scala
@@ -0,0 +1,9 @@
+import scala.language.experimental.macros
+import scala.reflect.macros.Context
+
+object Macros {
+ def impl(c: Context) = {
+ throw new Exception()
+ }
+ def exception = macro impl
+} \ No newline at end of file