summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/macro-argc-mismatch.check49
-rw-r--r--test/files/neg/macro-argc-mismatch/Macros_1.scala16
-rw-r--r--test/files/neg/macro-argc-mismatch/Test_2.scala19
-rw-r--r--test/files/neg/macro-invalidusage-badargs.check5
-rw-r--r--test/files/neg/macro-qmarkqmarkqmark.check2
-rw-r--r--test/files/neg/t7157.check36
6 files changed, 15 insertions, 112 deletions
diff --git a/test/files/neg/macro-argc-mismatch.check b/test/files/neg/macro-argc-mismatch.check
deleted file mode 100644
index 617daa890c..0000000000
--- a/test/files/neg/macro-argc-mismatch.check
+++ /dev/null
@@ -1,49 +0,0 @@
-Test_2.scala:4: error: missing arguments for macro method one in object Macros
- one
- ^
-Test_2.scala:5: error: not enough arguments for macro method one: (x: Int)Unit.
-Unspecified value parameter x.
- one()
- ^
-Test_2.scala:6: error: too many arguments for macro method one: (x: Int)Unit
- one(2, 3)
- ^
-Test_2.scala:7: error: not enough arguments for macro method one: (x: Int)Unit.
-Unspecified value parameter x.
- one()()
- ^
-Test_2.scala:8: error: Unit does not take parameters
- one(1)()
- ^
-Test_2.scala:10: error: missing arguments for macro method two in object Macros
- two
- ^
-Test_2.scala:11: error: not enough arguments for macro method two: (x: Int)(y: Int)Unit.
-Unspecified value parameter x.
- two()
- ^
-Test_2.scala:12: error: too many arguments for macro method two: (x: Int)(y: Int)Unit
- two(2, 3)
- ^
-Test_2.scala:13: error: not enough arguments for macro method two: (x: Int)(y: Int)Unit.
-Unspecified value parameter x.
- two()()
- ^
-Test_2.scala:14: error: missing arguments for macro method two in object Macros
- two(1)
- ^
-Test_2.scala:15: error: not enough arguments for macro method two: (y: Int)Unit.
-Unspecified value parameter y.
- two(1)()
- ^
-Test_2.scala:16: error: too many arguments for macro method two: (y: Int)Unit
- two(1)(2, 3)
- ^
-Test_2.scala:17: error: not enough arguments for macro method two: (y: Int)Unit.
-Unspecified value parameter y.
- two(1)()()
- ^
-Test_2.scala:18: error: Unit does not take parameters
- two(1)(1)()
- ^
-14 errors found
diff --git a/test/files/neg/macro-argc-mismatch/Macros_1.scala b/test/files/neg/macro-argc-mismatch/Macros_1.scala
deleted file mode 100644
index 4dca644172..0000000000
--- a/test/files/neg/macro-argc-mismatch/Macros_1.scala
+++ /dev/null
@@ -1,16 +0,0 @@
-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"()"
- }
-}
diff --git a/test/files/neg/macro-argc-mismatch/Test_2.scala b/test/files/neg/macro-argc-mismatch/Test_2.scala
deleted file mode 100644
index 28f9c35654..0000000000
--- a/test/files/neg/macro-argc-mismatch/Test_2.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-import Macros._
-
-object Test extends App {
- one
- one()
- one(2, 3)
- one()()
- one(1)()
-
- two
- two()
- two(2, 3)
- two()()
- two(1)
- two(1)()
- two(1)(2, 3)
- two(1)()()
- two(1)(1)()
-} \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-badargs.check b/test/files/neg/macro-invalidusage-badargs.check
index 3fd3c53691..4c1115418b 100644
--- a/test/files/neg/macro-invalidusage-badargs.check
+++ b/test/files/neg/macro-invalidusage-badargs.check
@@ -3,14 +3,13 @@ Macros_Test_2.scala:5: error: type mismatch;
required: Int
foo("42")
^
-Macros_Test_2.scala:6: error: missing arguments for macro method foo in object Macros
+Macros_Test_2.scala:6: error: too few argument lists for macro invocation
foo
^
Macros_Test_2.scala:7: error: Int does not take parameters
foo(4)(2)
^
-Macros_Test_2.scala:8: error: not enough arguments for macro method foo: (x: Int)Int.
-Unspecified value parameter x.
+Macros_Test_2.scala:8: error: macro applications do not support named and/or default arguments
foo()
^
Macros_Test_2.scala:9: error: too many arguments for macro method foo: (x: Int)Int
diff --git a/test/files/neg/macro-qmarkqmarkqmark.check b/test/files/neg/macro-qmarkqmarkqmark.check
index b4f8ea905f..bc3e25edaf 100644
--- a/test/files/neg/macro-qmarkqmarkqmark.check
+++ b/test/files/neg/macro-qmarkqmarkqmark.check
@@ -1,7 +1,7 @@
macro-qmarkqmarkqmark.scala:5: error: macro implementation is missing
foo1
^
-macro-qmarkqmarkqmark.scala:8: error: missing arguments for macro method foo2 in object Macros
+macro-qmarkqmarkqmark.scala:8: error: too few argument lists for macro invocation
foo2
^
macro-qmarkqmarkqmark.scala:9: error: macro implementation is missing
diff --git a/test/files/neg/t7157.check b/test/files/neg/t7157.check
index 3988460d4b..c6a7af9a23 100644
--- a/test/files/neg/t7157.check
+++ b/test/files/neg/t7157.check
@@ -7,8 +7,7 @@ Test_2.scala:6: error: too many arguments for macro method m1_0_0: ()Unit
Test_2.scala:7: error: too many arguments for macro method m1_0_0: ()Unit
m1_0_0(1, 2, 3)
^
-Test_2.scala:9: error: not enough arguments for macro method m1_1_1: (x: Int)Unit.
-Unspecified value parameter x.
+Test_2.scala:9: error: macro applications do not support named and/or default arguments
m1_1_1()
^
Test_2.scala:11: error: too many arguments for macro method m1_1_1: (x: Int)Unit
@@ -17,27 +16,22 @@ Test_2.scala:11: error: too many arguments for macro method m1_1_1: (x: Int)Unit
Test_2.scala:12: error: too many arguments for macro method m1_1_1: (x: Int)Unit
m1_1_1(1, 2, 3)
^
-Test_2.scala:14: error: not enough arguments for macro method m1_2_2: (x: Int, y: Int)Unit.
-Unspecified value parameters x, y.
+Test_2.scala:14: error: macro applications do not support named and/or default arguments
m1_2_2()
^
-Test_2.scala:15: error: not enough arguments for macro method m1_2_2: (x: Int, y: Int)Unit.
-Unspecified value parameter y.
+Test_2.scala:15: error: macro applications do not support named and/or default arguments
m1_2_2(1)
^
Test_2.scala:17: error: too many arguments for macro method m1_2_2: (x: Int, y: Int)Unit
m1_2_2(1, 2, 3)
^
-Test_2.scala:24: error: not enough arguments for macro method m1_1_inf: (x: Int, y: Int*)Unit.
-Unspecified value parameters x, y.
+Test_2.scala:24: error: macro applications do not support named and/or default arguments
m1_1_inf()
^
-Test_2.scala:29: error: not enough arguments for macro method m1_2_inf: (x: Int, y: Int, z: Int*)Unit.
-Unspecified value parameters x, y, z.
+Test_2.scala:29: error: macro applications do not support named and/or default arguments
m1_2_inf()
^
-Test_2.scala:30: error: not enough arguments for macro method m1_2_inf: (x: Int, y: Int, z: Int*)Unit.
-Unspecified value parameters y, z.
+Test_2.scala:30: error: macro applications do not support named and/or default arguments
m1_2_inf(1)
^
Test_2.scala:35: error: too many arguments for macro method m2_0_0: ()Unit
@@ -49,8 +43,7 @@ Test_2.scala:36: error: too many arguments for macro method m2_0_0: ()Unit
Test_2.scala:37: error: too many arguments for macro method m2_0_0: ()Unit
m2_0_0()(1, 2, 3)
^
-Test_2.scala:39: error: not enough arguments for macro method m2_1_1: (x: Int)Unit.
-Unspecified value parameter x.
+Test_2.scala:39: error: macro applications do not support named and/or default arguments
m2_1_1()()
^
Test_2.scala:41: error: too many arguments for macro method m2_1_1: (x: Int)Unit
@@ -59,27 +52,22 @@ Test_2.scala:41: error: too many arguments for macro method m2_1_1: (x: Int)Unit
Test_2.scala:42: error: too many arguments for macro method m2_1_1: (x: Int)Unit
m2_1_1()(1, 2, 3)
^
-Test_2.scala:44: error: not enough arguments for macro method m2_2_2: (x: Int, y: Int)Unit.
-Unspecified value parameters x, y.
+Test_2.scala:44: error: macro applications do not support named and/or default arguments
m2_2_2()()
^
-Test_2.scala:45: error: not enough arguments for macro method m2_2_2: (x: Int, y: Int)Unit.
-Unspecified value parameter y.
+Test_2.scala:45: error: macro applications do not support named and/or default arguments
m2_2_2()(1)
^
Test_2.scala:47: error: too many arguments for macro method m2_2_2: (x: Int, y: Int)Unit
m2_2_2()(1, 2, 3)
^
-Test_2.scala:54: error: not enough arguments for macro method m2_1_inf: (x: Int, y: Int*)Unit.
-Unspecified value parameters x, y.
+Test_2.scala:54: error: macro applications do not support named and/or default arguments
m2_1_inf()()
^
-Test_2.scala:59: error: not enough arguments for macro method m2_2_inf: (x: Int, y: Int, z: Int*)Unit.
-Unspecified value parameters x, y, z.
+Test_2.scala:59: error: macro applications do not support named and/or default arguments
m2_2_inf()()
^
-Test_2.scala:60: error: not enough arguments for macro method m2_2_inf: (x: Int, y: Int, z: Int*)Unit.
-Unspecified value parameters y, z.
+Test_2.scala:60: error: macro applications do not support named and/or default arguments
m2_2_inf()(1)
^
24 errors found