summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/applydynamic_sip.check10
-rw-r--r--test/files/neg/applydynamic_sip.scala10
-rw-r--r--test/files/neg/array-not-seq.check12
-rw-r--r--test/files/neg/exhausting.flags2
-rw-r--r--test/files/neg/gadts1.check5
-rw-r--r--test/files/neg/macro-argtype-mismatch.flags2
-rw-r--r--test/files/neg/macro-basic-mamdmi.flags2
-rw-r--r--test/files/neg/macro-cyclic.flags2
-rw-r--r--test/files/neg/macro-deprecate-dont-touch-backquotedidents.check10
-rw-r--r--test/files/neg/macro-deprecate-dont-touch-backquotedidents.flags1
-rw-r--r--test/files/neg/macro-deprecate-dont-touch-backquotedidents.scala56
-rw-r--r--test/files/neg/macro-deprecate-idents.check38
-rw-r--r--test/files/neg/macro-invalidimpl-a.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-b.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-c.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-d.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-e.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-f.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-g.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-h.flags2
-rw-r--r--test/files/neg/macro-invalidret-nontree.flags2
-rw-r--r--test/files/neg/macro-invalidret-nonuniversetree.flags2
-rw-r--r--test/files/neg/macro-invalidshape-a.flags2
-rw-r--r--test/files/neg/macro-invalidshape-b.flags2
-rw-r--r--test/files/neg/macro-invalidshape-c.flags2
-rw-r--r--test/files/neg/macro-invalidshape-d.check6
-rw-r--r--test/files/neg/macro-invalidshape-d.flags2
-rw-r--r--test/files/neg/macro-invalidsig-context-bounds.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badargc.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badtype.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badvarargs.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-noctx.flags2
-rw-r--r--test/files/neg/macro-invalidsig-implicit-params.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-badargc.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-badtype.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-badvarargs.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-namemismatch.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-badtype.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-a.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-b.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-a.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-b.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-c.flags2
-rw-r--r--test/files/neg/macro-invalidusage-badargs.flags2
-rw-r--r--test/files/neg/macro-invalidusage-badbounds.flags2
-rw-r--r--test/files/neg/macro-invalidusage-badtargs.flags2
-rw-r--r--test/files/neg/macro-invalidusage-methodvaluesyntax.flags2
-rw-r--r--test/files/neg/macro-keyword-bind.check7
-rw-r--r--test/files/neg/macro-keyword-bind.flags1
-rw-r--r--test/files/neg/macro-keyword-bind.scala6
-rw-r--r--test/files/neg/macro-keyword-class1.check4
-rw-r--r--test/files/neg/macro-keyword-class1.flags1
-rw-r--r--test/files/neg/macro-keyword-class1.scala3
-rw-r--r--test/files/neg/macro-keyword-class2.check4
-rw-r--r--test/files/neg/macro-keyword-class2.flags1
-rw-r--r--test/files/neg/macro-keyword-class2.scala3
-rw-r--r--test/files/neg/macro-keyword-object1.check4
-rw-r--r--test/files/neg/macro-keyword-object1.flags1
-rw-r--r--test/files/neg/macro-keyword-object1.scala3
-rw-r--r--test/files/neg/macro-keyword-object2.check4
-rw-r--r--test/files/neg/macro-keyword-object2.flags1
-rw-r--r--test/files/neg/macro-keyword-object2.scala3
-rw-r--r--test/files/neg/macro-keyword-package1.check4
-rw-r--r--test/files/neg/macro-keyword-package1.flags1
-rw-r--r--test/files/neg/macro-keyword-package1.scala3
-rw-r--r--test/files/neg/macro-keyword-package2.check4
-rw-r--r--test/files/neg/macro-keyword-package2.flags1
-rw-r--r--test/files/neg/macro-keyword-package2.scala3
-rw-r--r--test/files/neg/macro-keyword-trait1.check4
-rw-r--r--test/files/neg/macro-keyword-trait1.flags1
-rw-r--r--test/files/neg/macro-keyword-trait1.scala3
-rw-r--r--test/files/neg/macro-keyword-trait2.check4
-rw-r--r--test/files/neg/macro-keyword-trait2.flags1
-rw-r--r--test/files/neg/macro-keyword-trait2.scala3
-rw-r--r--test/files/neg/macro-keyword-type.check4
-rw-r--r--test/files/neg/macro-keyword-type.flags1
-rw-r--r--test/files/neg/macro-keyword-type.scala3
-rw-r--r--test/files/neg/macro-keyword-val.check7
-rw-r--r--test/files/neg/macro-keyword-val.flags1
-rw-r--r--test/files/neg/macro-keyword-val.scala3
-rw-r--r--test/files/neg/macro-keyword-var.check7
-rw-r--r--test/files/neg/macro-keyword-var.flags1
-rw-r--r--test/files/neg/macro-keyword-var.scala3
-rw-r--r--test/files/neg/macro-noexpand.flags2
-rw-r--r--test/files/neg/macro-noncompilertree.flags2
-rw-r--r--test/files/neg/macro-nontree.flags2
-rw-r--r--test/files/neg/macro-nontypeablebody.flags2
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-a.flags2
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-b.flags2
-rw-r--r--test/files/neg/macro-override-method-overrides-macro.flags2
-rw-r--r--test/files/neg/macro-without-xmacros-a.check19
-rw-r--r--test/files/neg/macro-without-xmacros-a/Impls_1.scala6
-rw-r--r--test/files/neg/macro-without-xmacros-b.check19
-rw-r--r--test/files/neg/macro-without-xmacros-b/Impls_1.scala6
-rw-r--r--test/files/neg/pat_unreachable.flags1
-rw-r--r--test/files/neg/patmat-type-check.check14
-rw-r--r--test/files/neg/patmatexhaust.flags2
-rw-r--r--test/files/neg/sealed-java-enums.flags2
-rw-r--r--test/files/neg/switch.flags1
-rw-r--r--test/files/neg/t0418.check5
-rw-r--r--test/files/neg/t112706A.check5
-rw-r--r--test/files/neg/t1878.check5
-rw-r--r--test/files/neg/t3098.flags2
-rw-r--r--test/files/neg/t3392.check5
-rw-r--r--test/files/neg/t3683a.flags2
-rw-r--r--test/files/neg/t3692.flags1
-rw-r--r--test/files/neg/t418.check5
-rw-r--r--test/files/neg/t4425.check2
-rw-r--r--test/files/neg/t5589neg.check5
-rw-r--r--test/files/neg/tailrec.check6
-rw-r--r--test/files/neg/unreachablechar.flags1
111 files changed, 186 insertions, 274 deletions
diff --git a/test/files/neg/applydynamic_sip.check b/test/files/neg/applydynamic_sip.check
new file mode 100644
index 0000000000..8845f68a52
--- /dev/null
+++ b/test/files/neg/applydynamic_sip.check
@@ -0,0 +1,10 @@
+applydynamic_sip.scala:7: error: applyDynamic does not support passing a vararg parameter
+ qual.sel(a, a2: _*)
+ ^
+applydynamic_sip.scala:8: error: applyDynamicNamed does not support passing a vararg parameter
+ qual.sel(arg = a, a2: _*)
+ ^
+applydynamic_sip.scala:9: error: applyDynamicNamed does not support passing a vararg parameter
+ qual.sel(arg, arg2 = "a2", a2: _*)
+ ^
+three errors found
diff --git a/test/files/neg/applydynamic_sip.scala b/test/files/neg/applydynamic_sip.scala
new file mode 100644
index 0000000000..362461577b
--- /dev/null
+++ b/test/files/neg/applydynamic_sip.scala
@@ -0,0 +1,10 @@
+object Test extends App {
+ val qual: Dynamic = ???
+ val expr = "expr"
+ val a = "a"
+ val a2 = "a2"
+
+ qual.sel(a, a2: _*)
+ qual.sel(arg = a, a2: _*)
+ qual.sel(arg, arg2 = "a2", a2: _*)
+} \ No newline at end of file
diff --git a/test/files/neg/array-not-seq.check b/test/files/neg/array-not-seq.check
index c16ecdad72..a3a639e772 100644
--- a/test/files/neg/array-not-seq.check
+++ b/test/files/neg/array-not-seq.check
@@ -1,7 +1,13 @@
array-not-seq.scala:2: error: An Array will no longer match as Seq[_].
def f1(x: Any) = x.isInstanceOf[Seq[_]]
^
-error: An Array will no longer match as Seq[_].
-error: An Array will no longer match as Seq[_].
-error: An Array will no longer match as Seq[_].
+array-not-seq.scala:4: error: An Array will no longer match as Seq[_].
+ case _: Seq[_] => true
+ ^
+array-not-seq.scala:16: error: An Array will no longer match as Seq[_].
+ case (Some(_: Seq[_]), Nil, _) => 1
+ ^
+array-not-seq.scala:17: error: An Array will no longer match as Seq[_].
+ case (None, List(_: List[_], _), _) => 2
+ ^
four errors found
diff --git a/test/files/neg/exhausting.flags b/test/files/neg/exhausting.flags
index e8fb65d50c..b7eb21d5f5 100644
--- a/test/files/neg/exhausting.flags
+++ b/test/files/neg/exhausting.flags
@@ -1 +1 @@
--Xfatal-warnings \ No newline at end of file
+-Xfatal-warnings -Xoldpatmat
diff --git a/test/files/neg/gadts1.check b/test/files/neg/gadts1.check
index 44d2b114d6..0441f604c9 100644
--- a/test/files/neg/gadts1.check
+++ b/test/files/neg/gadts1.check
@@ -11,4 +11,7 @@ gadts1.scala:20: error: type mismatch;
required: a
case Cell[a](x: Int) => c.x = 5
^
-three errors found
+gadts1.scala:20: error: Could not typecheck extractor call: case class <none> with arguments List((x @ (_: Int)))
+ case Cell[a](x: Int) => c.x = 5
+ ^
+four errors found
diff --git a/test/files/neg/macro-argtype-mismatch.flags b/test/files/neg/macro-argtype-mismatch.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-argtype-mismatch.flags
+++ b/test/files/neg/macro-argtype-mismatch.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-basic-mamdmi.flags b/test/files/neg/macro-basic-mamdmi.flags
index 06a7b31f11..5e5dd6ce79 100644
--- a/test/files/neg/macro-basic-mamdmi.flags
+++ b/test/files/neg/macro-basic-mamdmi.flags
@@ -1 +1 @@
--Xmacros
+-language:experimental.macros
diff --git a/test/files/neg/macro-cyclic.flags b/test/files/neg/macro-cyclic.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-cyclic.flags
+++ b/test/files/neg/macro-cyclic.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.check b/test/files/neg/macro-deprecate-dont-touch-backquotedidents.check
deleted file mode 100644
index 25df9a6a4a..0000000000
--- a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.check
+++ /dev/null
@@ -1,10 +0,0 @@
-macro-deprecate-dont-touch-backquotedidents.scala:37: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
-package `macro` {
- ^
-macro-deprecate-dont-touch-backquotedidents.scala:38: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package `macro`.bar {
- ^
-macro-deprecate-dont-touch-backquotedidents.scala:43: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package `macro`.foo {
- ^
-three errors found
diff --git a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.flags b/test/files/neg/macro-deprecate-dont-touch-backquotedidents.flags
deleted file mode 100644
index e8fb65d50c..0000000000
--- a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfatal-warnings \ No newline at end of file
diff --git a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.scala b/test/files/neg/macro-deprecate-dont-touch-backquotedidents.scala
deleted file mode 100644
index dee2f1de3b..0000000000
--- a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.scala
+++ /dev/null
@@ -1,56 +0,0 @@
-object Test1 {
- val `macro` = ???
-}
-
-object Test2 {
- var `macro` = ???
-}
-
-object Test3 {
- type `macro` = Int
-}
-
-package test4 {
- class `macro`
-}
-
-object Test5 {
- class `macro`
-}
-
-package test6 {
- object `macro`
-}
-
-object Test7 {
- object `macro`
-}
-
-package test8 {
- trait `macro`
-}
-
-object Test9 {
- trait `macro`
-}
-
-package `macro` {
- package `macro`.bar {
- }
-}
-
-package foo {
- package `macro`.foo {
- }
-}
-
-object Test12 {
- val Some(`macro`) = Some(42)
- `macro` match {
- case `macro` => println(`macro`)
- }
-}
-
-object Test13 {
- def `macro` = 2
-} \ No newline at end of file
diff --git a/test/files/neg/macro-deprecate-idents.check b/test/files/neg/macro-deprecate-idents.check
index bd685fc7b9..f8a7e519df 100644
--- a/test/files/neg/macro-deprecate-idents.check
+++ b/test/files/neg/macro-deprecate-idents.check
@@ -1,46 +1,52 @@
-macro-deprecate-idents.scala:2: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:2: error: macro is now a reserved word; usage as an identifier is deprecated
val macro = ???
^
-macro-deprecate-idents.scala:6: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:6: error: macro is now a reserved word; usage as an identifier is deprecated
var macro = ???
^
-macro-deprecate-idents.scala:10: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:10: error: macro is now a reserved word; usage as an identifier is deprecated
type macro = Int
^
-macro-deprecate-idents.scala:14: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:14: error: macro is now a reserved word; usage as an identifier is deprecated
class macro
^
-macro-deprecate-idents.scala:18: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:18: error: macro is now a reserved word; usage as an identifier is deprecated
class macro
^
-macro-deprecate-idents.scala:22: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:22: error: macro is now a reserved word; usage as an identifier is deprecated
object macro
^
-macro-deprecate-idents.scala:26: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:26: error: macro is now a reserved word; usage as an identifier is deprecated
object macro
^
-macro-deprecate-idents.scala:30: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:30: error: macro is now a reserved word; usage as an identifier is deprecated
trait macro
^
-macro-deprecate-idents.scala:34: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:34: error: macro is now a reserved word; usage as an identifier is deprecated
trait macro
^
-macro-deprecate-idents.scala:37: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:37: error: macro is now a reserved word; usage as an identifier is deprecated
package macro {
^
-macro-deprecate-idents.scala:38: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:38: error: macro is now a reserved word; usage as an identifier is deprecated
package macro.bar {
^
-macro-deprecate-idents.scala:43: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:43: error: macro is now a reserved word; usage as an identifier is deprecated
package macro.foo {
^
-macro-deprecate-idents.scala:48: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:48: error: macro is now a reserved word; usage as an identifier is deprecated
val Some(macro) = Some(42)
^
-macro-deprecate-idents.scala:50: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:49: error: macro is now a reserved word; usage as an identifier is deprecated
+ macro match {
+ ^
+macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
case macro => println(macro)
^
-macro-deprecate-idents.scala:55: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
+macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
+ case macro => println(macro)
+ ^
+macro-deprecate-idents.scala:55: error: macro is now a reserved word; usage as an identifier is deprecated
def macro = 2
^
-15 errors found
+17 errors found
diff --git a/test/files/neg/macro-invalidimpl-a.flags b/test/files/neg/macro-invalidimpl-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-a.flags
+++ b/test/files/neg/macro-invalidimpl-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-b.flags b/test/files/neg/macro-invalidimpl-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-b.flags
+++ b/test/files/neg/macro-invalidimpl-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-c.flags b/test/files/neg/macro-invalidimpl-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-c.flags
+++ b/test/files/neg/macro-invalidimpl-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-d.flags b/test/files/neg/macro-invalidimpl-d.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-d.flags
+++ b/test/files/neg/macro-invalidimpl-d.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-e.flags b/test/files/neg/macro-invalidimpl-e.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-e.flags
+++ b/test/files/neg/macro-invalidimpl-e.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-f.flags b/test/files/neg/macro-invalidimpl-f.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-f.flags
+++ b/test/files/neg/macro-invalidimpl-f.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-g.flags b/test/files/neg/macro-invalidimpl-g.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-g.flags
+++ b/test/files/neg/macro-invalidimpl-g.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-h.flags b/test/files/neg/macro-invalidimpl-h.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-h.flags
+++ b/test/files/neg/macro-invalidimpl-h.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidret-nontree.flags b/test/files/neg/macro-invalidret-nontree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidret-nontree.flags
+++ b/test/files/neg/macro-invalidret-nontree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidret-nonuniversetree.flags b/test/files/neg/macro-invalidret-nonuniversetree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidret-nonuniversetree.flags
+++ b/test/files/neg/macro-invalidret-nonuniversetree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-a.flags b/test/files/neg/macro-invalidshape-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidshape-a.flags
+++ b/test/files/neg/macro-invalidshape-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-b.flags b/test/files/neg/macro-invalidshape-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidshape-b.flags
+++ b/test/files/neg/macro-invalidshape-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-c.flags b/test/files/neg/macro-invalidshape-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidshape-c.flags
+++ b/test/files/neg/macro-invalidshape-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-d.check b/test/files/neg/macro-invalidshape-d.check
index 031aa653ab..f0d77e2f2d 100644
--- a/test/files/neg/macro-invalidshape-d.check
+++ b/test/files/neg/macro-invalidshape-d.check
@@ -1,4 +1,8 @@
-Macros_Test_2.scala:2: error: illegal start of statement
+Macros_Test_2.scala:2: warning: macro is now a reserved word; usage as an identifier is deprecated
def foo(x: Any) = {2; macro Impls.foo}
^
+Macros_Test_2.scala:2: error: ';' expected but '.' found.
+ def foo(x: Any) = {2; macro Impls.foo}
+ ^
+one warning found
one error found
diff --git a/test/files/neg/macro-invalidshape-d.flags b/test/files/neg/macro-invalidshape-d.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidshape-d.flags
+++ b/test/files/neg/macro-invalidshape-d.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-context-bounds.flags b/test/files/neg/macro-invalidsig-context-bounds.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-context-bounds.flags
+++ b/test/files/neg/macro-invalidsig-context-bounds.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-badargc.flags b/test/files/neg/macro-invalidsig-ctx-badargc.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-badargc.flags
+++ b/test/files/neg/macro-invalidsig-ctx-badargc.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-badtype.flags b/test/files/neg/macro-invalidsig-ctx-badtype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-badtype.flags
+++ b/test/files/neg/macro-invalidsig-ctx-badtype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-badvarargs.flags b/test/files/neg/macro-invalidsig-ctx-badvarargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-badvarargs.flags
+++ b/test/files/neg/macro-invalidsig-ctx-badvarargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-noctx.flags b/test/files/neg/macro-invalidsig-ctx-noctx.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-noctx.flags
+++ b/test/files/neg/macro-invalidsig-ctx-noctx.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-implicit-params.flags b/test/files/neg/macro-invalidsig-implicit-params.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-implicit-params.flags
+++ b/test/files/neg/macro-invalidsig-implicit-params.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-badargc.flags b/test/files/neg/macro-invalidsig-params-badargc.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-badargc.flags
+++ b/test/files/neg/macro-invalidsig-params-badargc.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-badtype.flags b/test/files/neg/macro-invalidsig-params-badtype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-badtype.flags
+++ b/test/files/neg/macro-invalidsig-params-badtype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-badvarargs.flags b/test/files/neg/macro-invalidsig-params-badvarargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-badvarargs.flags
+++ b/test/files/neg/macro-invalidsig-params-badvarargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-namemismatch.flags b/test/files/neg/macro-invalidsig-params-namemismatch.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-namemismatch.flags
+++ b/test/files/neg/macro-invalidsig-params-namemismatch.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-badtype.flags b/test/files/neg/macro-invalidsig-tparams-badtype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-badtype.flags
+++ b/test/files/neg/macro-invalidsig-tparams-badtype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-a.flags b/test/files/neg/macro-invalidsig-tparams-bounds-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-a.flags
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-b.flags b/test/files/neg/macro-invalidsig-tparams-bounds-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-b.flags
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-a.flags b/test/files/neg/macro-invalidsig-tparams-notparams-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-a.flags
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-b.flags b/test/files/neg/macro-invalidsig-tparams-notparams-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-b.flags
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-c.flags b/test/files/neg/macro-invalidsig-tparams-notparams-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-c.flags
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-badargs.flags b/test/files/neg/macro-invalidusage-badargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-badargs.flags
+++ b/test/files/neg/macro-invalidusage-badargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-badbounds.flags b/test/files/neg/macro-invalidusage-badbounds.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-badbounds.flags
+++ b/test/files/neg/macro-invalidusage-badbounds.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-badtargs.flags b/test/files/neg/macro-invalidusage-badtargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-badtargs.flags
+++ b/test/files/neg/macro-invalidusage-badtargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-methodvaluesyntax.flags b/test/files/neg/macro-invalidusage-methodvaluesyntax.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-methodvaluesyntax.flags
+++ b/test/files/neg/macro-invalidusage-methodvaluesyntax.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-bind.check b/test/files/neg/macro-keyword-bind.check
deleted file mode 100644
index 1f74cfe5cd..0000000000
--- a/test/files/neg/macro-keyword-bind.check
+++ /dev/null
@@ -1,7 +0,0 @@
-macro-keyword-bind.scala:2: error: illegal start of simple pattern
- val Some(macro) = Some(42)
- ^
-macro-keyword-bind.scala:6: error: ')' expected but '}' found.
-}
-^
-two errors found
diff --git a/test/files/neg/macro-keyword-bind.flags b/test/files/neg/macro-keyword-bind.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-bind.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-bind.scala b/test/files/neg/macro-keyword-bind.scala
deleted file mode 100644
index a3b1553348..0000000000
--- a/test/files/neg/macro-keyword-bind.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-object Test12 {
- val Some(macro) = Some(42)
- macro match {
- case macro => println(macro)
- }
-} \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-class1.check b/test/files/neg/macro-keyword-class1.check
deleted file mode 100644
index d8983180ef..0000000000
--- a/test/files/neg/macro-keyword-class1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-class1.scala:3: error: identifier expected but 'macro' found.
-class macro
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-class1.flags b/test/files/neg/macro-keyword-class1.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-class1.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-class1.scala b/test/files/neg/macro-keyword-class1.scala
deleted file mode 100644
index 8635d1f4f6..0000000000
--- a/test/files/neg/macro-keyword-class1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package test4
-
-class macro
diff --git a/test/files/neg/macro-keyword-class2.check b/test/files/neg/macro-keyword-class2.check
deleted file mode 100644
index 0e4d11bcc4..0000000000
--- a/test/files/neg/macro-keyword-class2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-class2.scala:2: error: identifier expected but 'macro' found.
- class macro
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-class2.flags b/test/files/neg/macro-keyword-class2.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-class2.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-class2.scala b/test/files/neg/macro-keyword-class2.scala
deleted file mode 100644
index af24a489d0..0000000000
--- a/test/files/neg/macro-keyword-class2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test5 {
- class macro
-}
diff --git a/test/files/neg/macro-keyword-object1.check b/test/files/neg/macro-keyword-object1.check
deleted file mode 100644
index cfbd06ffd6..0000000000
--- a/test/files/neg/macro-keyword-object1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-object1.scala:3: error: identifier expected but 'macro' found.
-object macro
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-object1.flags b/test/files/neg/macro-keyword-object1.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-object1.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-object1.scala b/test/files/neg/macro-keyword-object1.scala
deleted file mode 100644
index 66eb494e6b..0000000000
--- a/test/files/neg/macro-keyword-object1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package test6
-
-object macro
diff --git a/test/files/neg/macro-keyword-object2.check b/test/files/neg/macro-keyword-object2.check
deleted file mode 100644
index ede31f13e5..0000000000
--- a/test/files/neg/macro-keyword-object2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-object2.scala:2: error: identifier expected but 'macro' found.
- object macro
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-object2.flags b/test/files/neg/macro-keyword-object2.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-object2.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-object2.scala b/test/files/neg/macro-keyword-object2.scala
deleted file mode 100644
index 6f5b9ceacd..0000000000
--- a/test/files/neg/macro-keyword-object2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test7 {
- object macro
-}
diff --git a/test/files/neg/macro-keyword-package1.check b/test/files/neg/macro-keyword-package1.check
deleted file mode 100644
index 22c1e11ded..0000000000
--- a/test/files/neg/macro-keyword-package1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-package1.scala:1: error: identifier expected but 'macro' found.
-package macro
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-package1.flags b/test/files/neg/macro-keyword-package1.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-package1.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-package1.scala b/test/files/neg/macro-keyword-package1.scala
deleted file mode 100644
index 52d3fbabf6..0000000000
--- a/test/files/neg/macro-keyword-package1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package macro
-
-package macro.bar \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-package2.check b/test/files/neg/macro-keyword-package2.check
deleted file mode 100644
index 0cb542a85d..0000000000
--- a/test/files/neg/macro-keyword-package2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-package2.scala:3: error: identifier expected but 'macro' found.
-package macro.foo
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-package2.flags b/test/files/neg/macro-keyword-package2.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-package2.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-package2.scala b/test/files/neg/macro-keyword-package2.scala
deleted file mode 100644
index a68ebd935f..0000000000
--- a/test/files/neg/macro-keyword-package2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package foo
-
-package macro.foo
diff --git a/test/files/neg/macro-keyword-trait1.check b/test/files/neg/macro-keyword-trait1.check
deleted file mode 100644
index 9586a62e08..0000000000
--- a/test/files/neg/macro-keyword-trait1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-trait1.scala:3: error: identifier expected but 'macro' found.
-trait macro
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-trait1.flags b/test/files/neg/macro-keyword-trait1.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-trait1.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-trait1.scala b/test/files/neg/macro-keyword-trait1.scala
deleted file mode 100644
index e32d4c1385..0000000000
--- a/test/files/neg/macro-keyword-trait1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package test8
-
-trait macro
diff --git a/test/files/neg/macro-keyword-trait2.check b/test/files/neg/macro-keyword-trait2.check
deleted file mode 100644
index 40aa764378..0000000000
--- a/test/files/neg/macro-keyword-trait2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-trait2.scala:2: error: identifier expected but 'macro' found.
- trait macro
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-trait2.flags b/test/files/neg/macro-keyword-trait2.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-trait2.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-trait2.scala b/test/files/neg/macro-keyword-trait2.scala
deleted file mode 100644
index 243a54abe6..0000000000
--- a/test/files/neg/macro-keyword-trait2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test9 {
- trait macro
-}
diff --git a/test/files/neg/macro-keyword-type.check b/test/files/neg/macro-keyword-type.check
deleted file mode 100644
index 4a7481114c..0000000000
--- a/test/files/neg/macro-keyword-type.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-type.scala:2: error: identifier expected but 'macro' found.
- type macro = Int
- ^
-one error found
diff --git a/test/files/neg/macro-keyword-type.flags b/test/files/neg/macro-keyword-type.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-type.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-type.scala b/test/files/neg/macro-keyword-type.scala
deleted file mode 100644
index 30e523bcaf..0000000000
--- a/test/files/neg/macro-keyword-type.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test3 {
- type macro = Int
-} \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-val.check b/test/files/neg/macro-keyword-val.check
deleted file mode 100644
index 0dc4c030a9..0000000000
--- a/test/files/neg/macro-keyword-val.check
+++ /dev/null
@@ -1,7 +0,0 @@
-macro-keyword-val.scala:2: error: illegal start of simple pattern
- val macro = ???
- ^
-macro-keyword-val.scala:3: error: '=' expected but '}' found.
-}
-^
-two errors found
diff --git a/test/files/neg/macro-keyword-val.flags b/test/files/neg/macro-keyword-val.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-val.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-val.scala b/test/files/neg/macro-keyword-val.scala
deleted file mode 100644
index 96f57acb30..0000000000
--- a/test/files/neg/macro-keyword-val.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test1 {
- val macro = ???
-} \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-var.check b/test/files/neg/macro-keyword-var.check
deleted file mode 100644
index 96d02e0052..0000000000
--- a/test/files/neg/macro-keyword-var.check
+++ /dev/null
@@ -1,7 +0,0 @@
-macro-keyword-var.scala:2: error: illegal start of simple pattern
- var macro = ???
- ^
-macro-keyword-var.scala:3: error: '=' expected but '}' found.
-}
-^
-two errors found
diff --git a/test/files/neg/macro-keyword-var.flags b/test/files/neg/macro-keyword-var.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-var.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-var.scala b/test/files/neg/macro-keyword-var.scala
deleted file mode 100644
index a79dda6dc2..0000000000
--- a/test/files/neg/macro-keyword-var.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test2 {
- var macro = ???
-} \ No newline at end of file
diff --git a/test/files/neg/macro-noexpand.flags b/test/files/neg/macro-noexpand.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-noexpand.flags
+++ b/test/files/neg/macro-noexpand.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-noncompilertree.flags b/test/files/neg/macro-noncompilertree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-noncompilertree.flags
+++ b/test/files/neg/macro-noncompilertree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-nontree.flags b/test/files/neg/macro-nontree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-nontree.flags
+++ b/test/files/neg/macro-nontree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-nontypeablebody.flags b/test/files/neg/macro-nontypeablebody.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-nontypeablebody.flags
+++ b/test/files/neg/macro-nontypeablebody.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags b/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags b/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-override-method-overrides-macro.flags b/test/files/neg/macro-override-method-overrides-macro.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-override-method-overrides-macro.flags
+++ b/test/files/neg/macro-override-method-overrides-macro.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-without-xmacros-a.check b/test/files/neg/macro-without-xmacros-a.check
index a3ca081f04..fd2667dbb8 100644
--- a/test/files/neg/macro-without-xmacros-a.check
+++ b/test/files/neg/macro-without-xmacros-a.check
@@ -1,10 +1,17 @@
-Macros_2.scala:5: error: not found: value macro
+Macros_2.scala:5: error: macro definition needs to be enabled
+by making the implicit value language.experimental.macros visible.
+This can be achieved by adding the import clause 'import language.experimental.macros'
+or by setting the compiler option -language:experimental.macros.
+See the Scala docs for value scala.language.experimental.macros for a discussion
+why the feature needs to be explicitly enabled.
def foo(x: Int): Int = macro foo_impl
- ^
-Macros_2.scala:7: error: not found: value macro
+ ^
+Macros_2.scala:7: error: macro definition needs to be enabled
+by making the implicit value language.experimental.macros visible.
def bar(x: Int): Int = macro bar_impl
- ^
-Macros_2.scala:11: error: not found: value macro
+ ^
+Macros_2.scala:11: error: macro definition needs to be enabled
+by making the implicit value language.experimental.macros visible.
def quux(x: Int): Int = macro quux_impl
- ^
+ ^
three errors found
diff --git a/test/files/neg/macro-without-xmacros-a/Impls_1.scala b/test/files/neg/macro-without-xmacros-a/Impls_1.scala
index 2493c81c95..01daf12b1a 100644
--- a/test/files/neg/macro-without-xmacros-a/Impls_1.scala
+++ b/test/files/neg/macro-without-xmacros-a/Impls_1.scala
@@ -1,17 +1,17 @@
import scala.reflect.makro.{Context => Ctx}
object Impls {
- def foo_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = {
+ def foo_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.mirror._
Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
}
- def bar_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = {
+ def bar_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.mirror._
Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
}
- def quux_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = {
+ def quux_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.mirror._
Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
}
diff --git a/test/files/neg/macro-without-xmacros-b.check b/test/files/neg/macro-without-xmacros-b.check
index dce4a084c9..2d675b8319 100644
--- a/test/files/neg/macro-without-xmacros-b.check
+++ b/test/files/neg/macro-without-xmacros-b.check
@@ -1,10 +1,17 @@
-Macros_2.scala:3: error: ';' expected but '.' found.
+Macros_2.scala:3: error: macro definition needs to be enabled
+by making the implicit value language.experimental.macros visible.
+This can be achieved by adding the import clause 'import language.experimental.macros'
+or by setting the compiler option -language:experimental.macros.
+See the Scala docs for value scala.language.experimental.macros for a discussion
+why the feature needs to be explicitly enabled.
def foo(x: Int): Int = macro Impls.foo_impl
- ^
-Macros_2.scala:5: error: ';' expected but '.' found.
+ ^
+Macros_2.scala:5: error: macro definition needs to be enabled
+by making the implicit value language.experimental.macros visible.
def bar(x: Int): Int = macro Impls.bar_impl
- ^
-Macros_2.scala:9: error: ';' expected but '.' found.
+ ^
+Macros_2.scala:9: error: macro definition needs to be enabled
+by making the implicit value language.experimental.macros visible.
def quux(x: Int): Int = macro Impls.quux_impl
- ^
+ ^
three errors found
diff --git a/test/files/neg/macro-without-xmacros-b/Impls_1.scala b/test/files/neg/macro-without-xmacros-b/Impls_1.scala
index 2493c81c95..01daf12b1a 100644
--- a/test/files/neg/macro-without-xmacros-b/Impls_1.scala
+++ b/test/files/neg/macro-without-xmacros-b/Impls_1.scala
@@ -1,17 +1,17 @@
import scala.reflect.makro.{Context => Ctx}
object Impls {
- def foo_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = {
+ def foo_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.mirror._
Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
}
- def bar_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = {
+ def bar_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.mirror._
Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
}
- def quux_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = {
+ def quux_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.mirror._
Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
}
diff --git a/test/files/neg/pat_unreachable.flags b/test/files/neg/pat_unreachable.flags
new file mode 100644
index 0000000000..ba80cad69b
--- /dev/null
+++ b/test/files/neg/pat_unreachable.flags
@@ -0,0 +1 @@
+-Xoldpatmat
diff --git a/test/files/neg/patmat-type-check.check b/test/files/neg/patmat-type-check.check
index e045841ce1..ab4451f089 100644
--- a/test/files/neg/patmat-type-check.check
+++ b/test/files/neg/patmat-type-check.check
@@ -3,19 +3,31 @@ patmat-type-check.scala:22: error: scrutinee is incompatible with pattern type;
required: String
def f1 = "bob".reverse match { case Seq('b', 'o', 'b') => true } // fail
^
+patmat-type-check.scala:22: error: value _1 is not a member of object Seq
+ def f1 = "bob".reverse match { case Seq('b', 'o', 'b') => true } // fail
+ ^
patmat-type-check.scala:23: error: scrutinee is incompatible with pattern type;
found : Seq[A]
required: Array[Char]
def f2 = "bob".toArray match { case Seq('b', 'o', 'b') => true } // fail
^
+patmat-type-check.scala:23: error: value _1 is not a member of object Seq
+ def f2 = "bob".toArray match { case Seq('b', 'o', 'b') => true } // fail
+ ^
patmat-type-check.scala:27: error: scrutinee is incompatible with pattern type;
found : Seq[A]
required: Test.Bop2
def f3(x: Bop2) = x match { case Seq('b', 'o', 'b') => true } // fail
^
+patmat-type-check.scala:27: error: value _1 is not a member of object Seq
+ def f3(x: Bop2) = x match { case Seq('b', 'o', 'b') => true } // fail
+ ^
patmat-type-check.scala:30: error: scrutinee is incompatible with pattern type;
found : Seq[A]
required: Test.Bop3[Char]
def f4[T](x: Bop3[Char]) = x match { case Seq('b', 'o', 'b') => true } // fail
^
-four errors found
+patmat-type-check.scala:30: error: value _1 is not a member of object Seq
+ def f4[T](x: Bop3[Char]) = x match { case Seq('b', 'o', 'b') => true } // fail
+ ^
+8 errors found
diff --git a/test/files/neg/patmatexhaust.flags b/test/files/neg/patmatexhaust.flags
index e8fb65d50c..b7eb21d5f5 100644
--- a/test/files/neg/patmatexhaust.flags
+++ b/test/files/neg/patmatexhaust.flags
@@ -1 +1 @@
--Xfatal-warnings \ No newline at end of file
+-Xfatal-warnings -Xoldpatmat
diff --git a/test/files/neg/sealed-java-enums.flags b/test/files/neg/sealed-java-enums.flags
index e709c65918..312f3a87ec 100644
--- a/test/files/neg/sealed-java-enums.flags
+++ b/test/files/neg/sealed-java-enums.flags
@@ -1 +1 @@
--Xexperimental -Xfatal-warnings
+-Xexperimental -Xfatal-warnings -Xoldpatmat
diff --git a/test/files/neg/switch.flags b/test/files/neg/switch.flags
new file mode 100644
index 0000000000..809e9ff2f2
--- /dev/null
+++ b/test/files/neg/switch.flags
@@ -0,0 +1 @@
+ -Xoldpatmat
diff --git a/test/files/neg/t0418.check b/test/files/neg/t0418.check
index 4e9ad2f9ae..50931a1bca 100644
--- a/test/files/neg/t0418.check
+++ b/test/files/neg/t0418.check
@@ -4,4 +4,7 @@ t0418.scala:2: error: not found: value Foo12340771
t0418.scala:2: error: not found: value x
null match { case Foo12340771.Bar(x) => x }
^
-two errors found
+t0418.scala:2: error: Could not typecheck extractor call: case class <none> with arguments List((x @ _))
+ null match { case Foo12340771.Bar(x) => x }
+ ^
+three errors found
diff --git a/test/files/neg/t112706A.check b/test/files/neg/t112706A.check
index 30d0c3ec91..fb18b31be1 100644
--- a/test/files/neg/t112706A.check
+++ b/test/files/neg/t112706A.check
@@ -3,4 +3,7 @@ t112706A.scala:5: error: constructor cannot be instantiated to expected type;
required: String
case Tuple2(node,_) =>
^
-one error found
+t112706A.scala:5: error: Could not typecheck extractor call: case class Tuple2 with arguments List((node @ _), _)
+ case Tuple2(node,_) =>
+ ^
+two errors found
diff --git a/test/files/neg/t1878.check b/test/files/neg/t1878.check
index 128741a022..b47367e12c 100644
--- a/test/files/neg/t1878.check
+++ b/test/files/neg/t1878.check
@@ -9,10 +9,13 @@ t1878.scala:3: error: scrutinee is incompatible with pattern type;
t1878.scala:3: error: not found: value f
val err1 = "" match { case Seq(f @ _*, ',') => f }
^
+t1878.scala:3: error: value _2 is not a member of object Seq
+ val err1 = "" match { case Seq(f @ _*, ',') => f }
+ ^
t1878.scala:9: error: _* may only come last
val List(List(_*, arg2), _) = List(List(1,2,3), List(4,5,6))
^
t1878.scala:13: error: _* may only come last
case <p> { _* } </p> =>
^
-5 errors found
+6 errors found
diff --git a/test/files/neg/t3098.flags b/test/files/neg/t3098.flags
index e8fb65d50c..b7eb21d5f5 100644
--- a/test/files/neg/t3098.flags
+++ b/test/files/neg/t3098.flags
@@ -1 +1 @@
--Xfatal-warnings \ No newline at end of file
+-Xfatal-warnings -Xoldpatmat
diff --git a/test/files/neg/t3392.check b/test/files/neg/t3392.check
index 842d63eec9..3a39098c4e 100644
--- a/test/files/neg/t3392.check
+++ b/test/files/neg/t3392.check
@@ -1,4 +1,7 @@
t3392.scala:9: error: not found: value x
case x@A(x/*<-- refers to the pattern that includes this comment*/.Ex(42)) =>
^
-one error found
+t3392.scala:9: error: Could not typecheck extractor call: case class <none> with arguments List(42)
+ case x@A(x/*<-- refers to the pattern that includes this comment*/.Ex(42)) =>
+ ^
+two errors found
diff --git a/test/files/neg/t3683a.flags b/test/files/neg/t3683a.flags
index 85d8eb2ba2..b7eb21d5f5 100644
--- a/test/files/neg/t3683a.flags
+++ b/test/files/neg/t3683a.flags
@@ -1 +1 @@
--Xfatal-warnings
+-Xfatal-warnings -Xoldpatmat
diff --git a/test/files/neg/t3692.flags b/test/files/neg/t3692.flags
new file mode 100644
index 0000000000..82becdfbfd
--- /dev/null
+++ b/test/files/neg/t3692.flags
@@ -0,0 +1 @@
+ -Xoldpatmat \ No newline at end of file
diff --git a/test/files/neg/t418.check b/test/files/neg/t418.check
index 1489547823..c06088ba9d 100644
--- a/test/files/neg/t418.check
+++ b/test/files/neg/t418.check
@@ -4,4 +4,7 @@ t418.scala:2: error: not found: value Foo12340771
t418.scala:2: error: not found: value x
null match { case Foo12340771.Bar(x) => x }
^
-two errors found
+t418.scala:2: error: Could not typecheck extractor call: case class <none> with arguments List((x @ _))
+ null match { case Foo12340771.Bar(x) => x }
+ ^
+three errors found
diff --git a/test/files/neg/t4425.check b/test/files/neg/t4425.check
index 4ff4b1eec0..0f2fe6f2d1 100644
--- a/test/files/neg/t4425.check
+++ b/test/files/neg/t4425.check
@@ -1,4 +1,4 @@
-t4425.scala:3: error: erroneous or inaccessible type
+t4425.scala:3: error: isInstanceOf cannot test if value types are references.
42 match { case _ X _ => () }
^
one error found
diff --git a/test/files/neg/t5589neg.check b/test/files/neg/t5589neg.check
index b3ff16d7e4..fb6858a397 100644
--- a/test/files/neg/t5589neg.check
+++ b/test/files/neg/t5589neg.check
@@ -22,6 +22,9 @@ t5589neg.scala:4: error: constructor cannot be instantiated to expected type;
t5589neg.scala:4: error: not found: value y2
def f7(x: Either[Int, (String, Int)]) = for (y1 @ Tuple1(y2) <- x.right) yield ((y1, y2))
^
+t5589neg.scala:4: error: Could not typecheck extractor call: case class Tuple1 with arguments List((y2 @ _))
+ def f7(x: Either[Int, (String, Int)]) = for (y1 @ Tuple1(y2) <- x.right) yield ((y1, y2))
+ ^
t5589neg.scala:5: error: constructor cannot be instantiated to expected type;
found : (T1, T2, T3)
required: (String, Int)
@@ -34,4 +37,4 @@ t5589neg.scala:5: error: not found: value y2
def f8(x: Either[Int, (String, Int)]) = for ((y1, y2, y3) <- x.right) yield ((y1, y2))
^
two warnings found
-7 errors found
+8 errors found
diff --git a/test/files/neg/tailrec.check b/test/files/neg/tailrec.check
index ad92731b2c..946d3421e6 100644
--- a/test/files/neg/tailrec.check
+++ b/test/files/neg/tailrec.check
@@ -4,9 +4,9 @@ tailrec.scala:45: error: could not optimize @tailrec annotated method facfail: i
tailrec.scala:50: error: could not optimize @tailrec annotated method fail1: it is neither private nor final so can be overridden
@tailrec def fail1(x: Int): Int = fail1(x)
^
-tailrec.scala:55: error: could not optimize @tailrec annotated method fail2: it contains a recursive call not in tail position
- case x :: xs => x :: fail2[T](xs)
- ^
+tailrec.scala:53: error: could not optimize @tailrec annotated method fail2: it contains a recursive call not in tail position
+ @tailrec final def fail2[T](xs: List[T]): List[T] = xs match {
+ ^
tailrec.scala:59: error: could not optimize @tailrec annotated method fail3: it is called recursively with different type arguments
@tailrec final def fail3[T](x: Int): Int = fail3(x - 1)
^
diff --git a/test/files/neg/unreachablechar.flags b/test/files/neg/unreachablechar.flags
new file mode 100644
index 0000000000..809e9ff2f2
--- /dev/null
+++ b/test/files/neg/unreachablechar.flags
@@ -0,0 +1 @@
+ -Xoldpatmat