summaryrefslogtreecommitdiff
path: root/test/files/neg/macro-argc-mismatch/Macros_1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/macro-argc-mismatch/Macros_1.scala')
-rw-r--r--test/files/neg/macro-argc-mismatch/Macros_1.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/macro-argc-mismatch/Macros_1.scala b/test/files/neg/macro-argc-mismatch/Macros_1.scala
new file mode 100644
index 0000000000..4dca644172
--- /dev/null
+++ b/test/files/neg/macro-argc-mismatch/Macros_1.scala
@@ -0,0 +1,16 @@
+import scala.language.experimental.macros
+import scala.reflect.macros.blackbox.Context
+
+object Macros {
+ def one(x: Int): Unit = macro oneImpl
+ def oneImpl(c: Context)(x: c.Tree) = {
+ import c.universe._
+ q"()"
+ }
+
+ def two(x: Int)(y: Int): Unit = macro twoImpl
+ def twoImpl(c: Context)(x: c.Tree)(y: c.Tree) = {
+ import c.universe._
+ q"()"
+ }
+}