summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-04-14 11:51:05 +0100
committerPaul Phillips <paulp@improving.org>2012-04-14 11:51:05 +0100
commit57c7debd62cd8c37723d80450141e3e3524a351c (patch)
tree23d22e428d200a3398b8310052e812b109cc141a /test
parent0b3b12fb29b8a4a624c4a0bb4520114f10599036 (diff)
parent631f60e4238552c614702d4594afaa01fe2ecd04 (diff)
downloadscala-57c7debd62cd8c37723d80450141e3e3524a351c.tar.gz
scala-57c7debd62cd8c37723d80450141e3e3524a351c.tar.bz2
scala-57c7debd62cd8c37723d80450141e3e3524a351c.zip
Merge branch 'develop'
Diffstat (limited to 'test')
-rw-r--r--test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check10
-rw-r--r--test/disabled/neg/macro-deprecate-idents.check46
-rw-r--r--test/disabled/neg/macro-invalidshape-d.check4
-rw-r--r--test/disabled/neg/macro-keyword-bind.flags2
-rw-r--r--test/disabled/neg/macro-keyword-class1.flags2
-rw-r--r--test/disabled/neg/macro-keyword-class2.flags2
-rw-r--r--test/disabled/neg/macro-keyword-object1.flags2
-rw-r--r--test/disabled/neg/macro-keyword-object2.flags2
-rw-r--r--test/disabled/neg/macro-keyword-package1.flags2
-rw-r--r--test/disabled/neg/macro-keyword-package2.flags2
-rw-r--r--test/disabled/neg/macro-keyword-trait1.flags2
-rw-r--r--test/disabled/neg/macro-keyword-trait2.flags2
-rw-r--r--test/disabled/neg/macro-keyword-type.flags2
-rw-r--r--test/disabled/neg/macro-keyword-val.flags2
-rw-r--r--test/disabled/neg/macro-without-xmacros-a.check10
-rw-r--r--test/disabled/neg/macro-without-xmacros-b.check10
-rw-r--r--test/disabled/run/macro-reflective-mamd-normal-mi.check0
-rw-r--r--test/disabled/run/macro-reflective-mamd-normal-mi.flags0
-rw-r--r--test/files/buildmanager/t2559/D.scala6
-rw-r--r--test/files/buildmanager/t2559/t2559.check5
-rw-r--r--test/files/continuations-run/match2.scala2
-rw-r--r--test/files/jvm/interpreter.scala2
-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-deprecate-idents.check52
-rw-r--r--test/files/neg/macro-deprecate-idents.flags (renamed from test/disabled/neg/macro-deprecate-idents.flags)0
-rw-r--r--test/files/neg/macro-deprecate-idents.scala (renamed from test/disabled/neg/macro-deprecate-idents.scala)0
-rw-r--r--test/files/neg/macro-invalidshape-d.check8
-rw-r--r--test/files/neg/macro-invalidshape-d.flags (renamed from test/disabled/neg/macro-invalidshape-d.flags)0
-rw-r--r--test/files/neg/macro-invalidshape-d/Impls_1.scala (renamed from test/disabled/neg/macro-invalidshape-d/Impls_1.scala)0
-rw-r--r--test/files/neg/macro-invalidshape-d/Macros_Test_2.scala (renamed from test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala)0
-rw-r--r--test/files/neg/macro-without-xmacros-a.check17
-rw-r--r--test/files/neg/macro-without-xmacros-a/Impls_1.scala (renamed from test/disabled/neg/macro-without-xmacros-a/Impls_1.scala)6
-rw-r--r--test/files/neg/macro-without-xmacros-a/Macros_2.scala (renamed from test/disabled/neg/macro-without-xmacros-a/Macros_2.scala)0
-rw-r--r--test/files/neg/macro-without-xmacros-a/Test_3.scala (renamed from test/disabled/neg/macro-without-xmacros-a/Test_3.scala)0
-rw-r--r--test/files/neg/macro-without-xmacros-b.check17
-rw-r--r--test/files/neg/macro-without-xmacros-b/Impls_1.scala (renamed from test/disabled/neg/macro-without-xmacros-b/Impls_1.scala)6
-rw-r--r--test/files/neg/macro-without-xmacros-b/Macros_2.scala (renamed from test/disabled/neg/macro-without-xmacros-b/Macros_2.scala)0
-rw-r--r--test/files/neg/macro-without-xmacros-b/Test_3.scala (renamed from test/disabled/neg/macro-without-xmacros-b/Test_3.scala)0
-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
-rw-r--r--test/files/pos/macro-deprecate-dont-touch-backquotedidents.flags (renamed from test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags)0
-rw-r--r--test/files/pos/macro-deprecate-dont-touch-backquotedidents.scala (renamed from test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala)12
-rw-r--r--test/files/pos/t1439.flags2
-rw-r--r--test/files/pos/virtpatmat_alts_subst.flags2
-rw-r--r--test/files/pos/virtpatmat_anonfun_for.flags1
-rw-r--r--test/files/pos/virtpatmat_binding_opt.flags2
-rw-r--r--test/files/pos/virtpatmat_castbinder.flags2
-rw-r--r--test/files/pos/virtpatmat_exist1.flags2
-rw-r--r--test/files/pos/virtpatmat_exist2.flags2
-rw-r--r--test/files/pos/virtpatmat_exist3.flags2
-rw-r--r--test/files/pos/virtpatmat_exist_uncurry.scala6
-rw-r--r--test/files/pos/virtpatmat_gadt_array.flags2
-rw-r--r--test/files/pos/virtpatmat_infer_single_1.flags2
-rw-r--r--test/files/pos/virtpatmat_instof_valuetype.flags2
-rw-r--r--test/files/pos/virtpatmat_obj_in_case.flags2
-rw-r--r--test/files/presentation/callcc-interpreter/Runner.scala4
-rw-r--r--test/files/presentation/random.check3
-rw-r--r--test/files/run/inline-ex-handlers.check261
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi.check1
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala (renamed from test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala)0
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala (renamed from test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala)3
-rw-r--r--test/files/run/patmat_unapp_abstype.check2
-rw-r--r--test/files/run/patmat_unapp_abstype.flags1
-rw-r--r--test/files/run/patmat_unapp_abstype.scala54
-rw-r--r--test/files/run/reify_fors.flags1
-rw-r--r--test/files/run/reify_maps.flags1
-rw-r--r--test/files/run/repl-suppressed-warnings.scala1
-rw-r--r--test/files/run/t2886.check10
-rw-r--r--test/files/run/t2886.scala9
-rw-r--r--test/files/run/t5273_1.flags1
-rw-r--r--test/files/run/t5273_2a.flags1
-rw-r--r--test/files/run/t5273_2b.flags1
-rw-r--r--test/files/run/virtpatmat_alts.flags2
-rw-r--r--test/files/run/virtpatmat_apply.flags2
-rw-r--r--test/files/run/virtpatmat_casting.flags2
-rw-r--r--test/files/run/virtpatmat_extends_product.flags2
-rw-r--r--test/files/run/virtpatmat_literal.flags2
-rw-r--r--test/files/run/virtpatmat_nested_lists.flags2
-rw-r--r--test/files/run/virtpatmat_npe.flags2
-rw-r--r--test/files/run/virtpatmat_opt_sharing.flags2
-rw-r--r--test/files/run/virtpatmat_partial.flags2
-rw-r--r--test/files/run/virtpatmat_staging.flags2
-rw-r--r--test/files/run/virtpatmat_stringinterp.check1
-rw-r--r--test/files/run/virtpatmat_stringinterp.flags1
-rw-r--r--test/files/run/virtpatmat_stringinterp.scala13
-rw-r--r--test/files/run/virtpatmat_switch.flags2
-rw-r--r--test/files/run/virtpatmat_tailcalls_verifyerror.flags2
-rw-r--r--test/files/run/virtpatmat_try.flags2
-rw-r--r--test/files/run/virtpatmat_typed.flags2
-rw-r--r--test/files/run/virtpatmat_unapply.flags2
-rw-r--r--test/files/run/virtpatmat_unapplyprod.flags2
-rw-r--r--test/files/run/virtpatmat_unapplyseq.flags2
-rw-r--r--test/files/specialized/spec-patmatch.check2
110 files changed, 447 insertions, 305 deletions
diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check
deleted file mode 100644
index 25df9a6a4a..0000000000
--- a/test/disabled/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/disabled/neg/macro-deprecate-idents.check b/test/disabled/neg/macro-deprecate-idents.check
deleted file mode 100644
index bd685fc7b9..0000000000
--- a/test/disabled/neg/macro-deprecate-idents.check
+++ /dev/null
@@ -1,46 +0,0 @@
-macro-deprecate-idents.scala:2: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- val macro = ???
- ^
-macro-deprecate-idents.scala:6: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- var macro = ???
- ^
-macro-deprecate-idents.scala:10: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- type macro = Int
- ^
-macro-deprecate-idents.scala:14: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- class macro
- ^
-macro-deprecate-idents.scala:18: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- class macro
- ^
-macro-deprecate-idents.scala:22: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- object macro
- ^
-macro-deprecate-idents.scala:26: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- object macro
- ^
-macro-deprecate-idents.scala:30: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- trait macro
- ^
-macro-deprecate-idents.scala:34: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- trait macro
- ^
-macro-deprecate-idents.scala:37: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
-package macro {
- ^
-macro-deprecate-idents.scala:38: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package macro.bar {
- ^
-macro-deprecate-idents.scala:43: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package macro.foo {
- ^
-macro-deprecate-idents.scala:48: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- 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.
- 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.
- def macro = 2
- ^
-15 errors found
diff --git a/test/disabled/neg/macro-invalidshape-d.check b/test/disabled/neg/macro-invalidshape-d.check
deleted file mode 100644
index 031aa653ab..0000000000
--- a/test/disabled/neg/macro-invalidshape-d.check
+++ /dev/null
@@ -1,4 +0,0 @@
-Macros_Test_2.scala:2: error: illegal start of statement
- def foo(x: Any) = {2; macro Impls.foo}
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-bind.flags b/test/disabled/neg/macro-keyword-bind.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-bind.flags
+++ b/test/disabled/neg/macro-keyword-bind.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-class1.flags b/test/disabled/neg/macro-keyword-class1.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-class1.flags
+++ b/test/disabled/neg/macro-keyword-class1.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-class2.flags b/test/disabled/neg/macro-keyword-class2.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-class2.flags
+++ b/test/disabled/neg/macro-keyword-class2.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-object1.flags b/test/disabled/neg/macro-keyword-object1.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-object1.flags
+++ b/test/disabled/neg/macro-keyword-object1.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-object2.flags b/test/disabled/neg/macro-keyword-object2.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-object2.flags
+++ b/test/disabled/neg/macro-keyword-object2.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-package1.flags b/test/disabled/neg/macro-keyword-package1.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-package1.flags
+++ b/test/disabled/neg/macro-keyword-package1.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-package2.flags b/test/disabled/neg/macro-keyword-package2.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-package2.flags
+++ b/test/disabled/neg/macro-keyword-package2.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-trait1.flags b/test/disabled/neg/macro-keyword-trait1.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-trait1.flags
+++ b/test/disabled/neg/macro-keyword-trait1.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-trait2.flags b/test/disabled/neg/macro-keyword-trait2.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-trait2.flags
+++ b/test/disabled/neg/macro-keyword-trait2.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-type.flags b/test/disabled/neg/macro-keyword-type.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-type.flags
+++ b/test/disabled/neg/macro-keyword-type.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-val.flags b/test/disabled/neg/macro-keyword-val.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/disabled/neg/macro-keyword-val.flags
+++ b/test/disabled/neg/macro-keyword-val.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-without-xmacros-a.check b/test/disabled/neg/macro-without-xmacros-a.check
deleted file mode 100644
index a3ca081f04..0000000000
--- a/test/disabled/neg/macro-without-xmacros-a.check
+++ /dev/null
@@ -1,10 +0,0 @@
-Macros_2.scala:5: error: not found: value macro
- def foo(x: Int): Int = macro foo_impl
- ^
-Macros_2.scala:7: error: not found: value macro
- def bar(x: Int): Int = macro bar_impl
- ^
-Macros_2.scala:11: error: not found: value macro
- def quux(x: Int): Int = macro quux_impl
- ^
-three errors found
diff --git a/test/disabled/neg/macro-without-xmacros-b.check b/test/disabled/neg/macro-without-xmacros-b.check
deleted file mode 100644
index dce4a084c9..0000000000
--- a/test/disabled/neg/macro-without-xmacros-b.check
+++ /dev/null
@@ -1,10 +0,0 @@
-Macros_2.scala:3: error: ';' expected but '.' found.
- def foo(x: Int): Int = macro Impls.foo_impl
- ^
-Macros_2.scala:5: error: ';' expected but '.' found.
- def bar(x: Int): Int = macro Impls.bar_impl
- ^
-Macros_2.scala:9: error: ';' expected but '.' found.
- def quux(x: Int): Int = macro Impls.quux_impl
- ^
-three errors found
diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi.check b/test/disabled/run/macro-reflective-mamd-normal-mi.check
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/disabled/run/macro-reflective-mamd-normal-mi.check
+++ /dev/null
diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi.flags b/test/disabled/run/macro-reflective-mamd-normal-mi.flags
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/disabled/run/macro-reflective-mamd-normal-mi.flags
+++ /dev/null
diff --git a/test/files/buildmanager/t2559/D.scala b/test/files/buildmanager/t2559/D.scala
index 906b69a3e7..62dc5427f9 100644
--- a/test/files/buildmanager/t2559/D.scala
+++ b/test/files/buildmanager/t2559/D.scala
@@ -1,8 +1,4 @@
object D {
- def x(a: A) =
- a match {
- case _: B => ()
- case _: C => ()
- }
+ def x(a: A) = if (a.isInstanceOf[B] || a.isInstanceOf[C]) ()
}
diff --git a/test/files/buildmanager/t2559/t2559.check b/test/files/buildmanager/t2559/t2559.check
index 752278fbe8..4d43838cf5 100644
--- a/test/files/buildmanager/t2559/t2559.check
+++ b/test/files/buildmanager/t2559/t2559.check
@@ -6,9 +6,4 @@ compiling Set(A.scala)
Changes: Map(class B -> List(), class C -> List(), class E -> List(Changed(Class(A))[class E extends a sealed trait A]), trait A -> List())
invalidate D.scala because it references changed class [Changed(Class(A))[class E extends a sealed trait A]]
compiling Set(D.scala)
-D.scala:3: warning: match is not exhaustive!
-missing combination E
-
- a match {
- ^
Changes: Map(object D -> List())
diff --git a/test/files/continuations-run/match2.scala b/test/files/continuations-run/match2.scala
index 8b0fb946df..5092ce3abe 100644
--- a/test/files/continuations-run/match2.scala
+++ b/test/files/continuations-run/match2.scala
@@ -18,7 +18,7 @@ object Test {
}
- def main(args: Array[String]): Any = {
+ def main(args: Array[String]): Unit = {
println(reset(test1()))
println(reset(test2()))
}
diff --git a/test/files/jvm/interpreter.scala b/test/files/jvm/interpreter.scala
index 1f289d9335..755b2ac9ae 100644
--- a/test/files/jvm/interpreter.scala
+++ b/test/files/jvm/interpreter.scala
@@ -2,7 +2,7 @@ import scala.tools.nsc._
import scala.tools.partest.ReplTest
object Test extends ReplTest {
- override def extraSettings = "-deprecation"
+ override def extraSettings = "-deprecation -Xoldpatmat"
def code = <code>
// basics
3+4
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-deprecate-idents.check b/test/files/neg/macro-deprecate-idents.check
new file mode 100644
index 0000000000..f8a7e519df
--- /dev/null
+++ b/test/files/neg/macro-deprecate-idents.check
@@ -0,0 +1,52 @@
+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: macro is now a reserved word; usage as an identifier is deprecated
+ var macro = ???
+ ^
+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: macro is now a reserved word; usage as an identifier is deprecated
+ class macro
+ ^
+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: macro is now a reserved word; usage as an identifier is deprecated
+ object macro
+ ^
+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: macro is now a reserved word; usage as an identifier is deprecated
+ trait macro
+ ^
+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: macro is now a reserved word; usage as an identifier is deprecated
+package macro {
+ ^
+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: macro is now a reserved word; usage as an identifier is deprecated
+ package macro.foo {
+ ^
+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: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: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
+ ^
+17 errors found
diff --git a/test/disabled/neg/macro-deprecate-idents.flags b/test/files/neg/macro-deprecate-idents.flags
index e8fb65d50c..e8fb65d50c 100644
--- a/test/disabled/neg/macro-deprecate-idents.flags
+++ b/test/files/neg/macro-deprecate-idents.flags
diff --git a/test/disabled/neg/macro-deprecate-idents.scala b/test/files/neg/macro-deprecate-idents.scala
index 23c398e341..23c398e341 100644
--- a/test/disabled/neg/macro-deprecate-idents.scala
+++ b/test/files/neg/macro-deprecate-idents.scala
diff --git a/test/files/neg/macro-invalidshape-d.check b/test/files/neg/macro-invalidshape-d.check
new file mode 100644
index 0000000000..f0d77e2f2d
--- /dev/null
+++ b/test/files/neg/macro-invalidshape-d.check
@@ -0,0 +1,8 @@
+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/disabled/neg/macro-invalidshape-d.flags b/test/files/neg/macro-invalidshape-d.flags
index cd66464f2f..cd66464f2f 100644
--- a/test/disabled/neg/macro-invalidshape-d.flags
+++ b/test/files/neg/macro-invalidshape-d.flags
diff --git a/test/disabled/neg/macro-invalidshape-d/Impls_1.scala b/test/files/neg/macro-invalidshape-d/Impls_1.scala
index 7b1620d117..7b1620d117 100644
--- a/test/disabled/neg/macro-invalidshape-d/Impls_1.scala
+++ b/test/files/neg/macro-invalidshape-d/Impls_1.scala
diff --git a/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala b/test/files/neg/macro-invalidshape-d/Macros_Test_2.scala
index bacd9a6e7c..bacd9a6e7c 100644
--- a/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala
+++ b/test/files/neg/macro-invalidshape-d/Macros_Test_2.scala
diff --git a/test/files/neg/macro-without-xmacros-a.check b/test/files/neg/macro-without-xmacros-a.check
new file mode 100644
index 0000000000..fd2667dbb8
--- /dev/null
+++ b/test/files/neg/macro-without-xmacros-a.check
@@ -0,0 +1,17 @@
+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: 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: 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/disabled/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/disabled/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/disabled/neg/macro-without-xmacros-a/Macros_2.scala b/test/files/neg/macro-without-xmacros-a/Macros_2.scala
index 62f9dcf505..62f9dcf505 100644
--- a/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala
+++ b/test/files/neg/macro-without-xmacros-a/Macros_2.scala
diff --git a/test/disabled/neg/macro-without-xmacros-a/Test_3.scala b/test/files/neg/macro-without-xmacros-a/Test_3.scala
index e9a10e20c9..e9a10e20c9 100644
--- a/test/disabled/neg/macro-without-xmacros-a/Test_3.scala
+++ b/test/files/neg/macro-without-xmacros-a/Test_3.scala
diff --git a/test/files/neg/macro-without-xmacros-b.check b/test/files/neg/macro-without-xmacros-b.check
new file mode 100644
index 0000000000..2d675b8319
--- /dev/null
+++ b/test/files/neg/macro-without-xmacros-b.check
@@ -0,0 +1,17 @@
+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: 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: 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/disabled/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/disabled/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/disabled/neg/macro-without-xmacros-b/Macros_2.scala b/test/files/neg/macro-without-xmacros-b/Macros_2.scala
index de7080c7e8..de7080c7e8 100644
--- a/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala
+++ b/test/files/neg/macro-without-xmacros-b/Macros_2.scala
diff --git a/test/disabled/neg/macro-without-xmacros-b/Test_3.scala b/test/files/neg/macro-without-xmacros-b/Test_3.scala
index e9a10e20c9..e9a10e20c9 100644
--- a/test/disabled/neg/macro-without-xmacros-b/Test_3.scala
+++ b/test/files/neg/macro-without-xmacros-b/Test_3.scala
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
diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags b/test/files/pos/macro-deprecate-dont-touch-backquotedidents.flags
index e8fb65d50c..e8fb65d50c 100644
--- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags
+++ b/test/files/pos/macro-deprecate-dont-touch-backquotedidents.flags
diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala b/test/files/pos/macro-deprecate-dont-touch-backquotedidents.scala
index dee2f1de3b..69a7333011 100644
--- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala
+++ b/test/files/pos/macro-deprecate-dont-touch-backquotedidents.scala
@@ -44,12 +44,12 @@ package foo {
}
}
-object Test12 {
- val Some(`macro`) = Some(42)
- `macro` match {
- case `macro` => println(`macro`)
- }
-}
+//object Test12 {
+// val Some(`macro`) = Some(42)
+// `macro` match {
+// case `macro` => println(`macro`)
+// }
+//}
object Test13 {
def `macro` = 2
diff --git a/test/files/pos/t1439.flags b/test/files/pos/t1439.flags
index d86a0144e8..1e70f5c5c7 100644
--- a/test/files/pos/t1439.flags
+++ b/test/files/pos/t1439.flags
@@ -1 +1 @@
--unchecked -Xfatal-warnings -language:higherKinds \ No newline at end of file
+-unchecked -Xfatal-warnings -Xoldpatmat -language:higherKinds
diff --git a/test/files/pos/virtpatmat_alts_subst.flags b/test/files/pos/virtpatmat_alts_subst.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_alts_subst.flags
+++ b/test/files/pos/virtpatmat_alts_subst.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_anonfun_for.flags b/test/files/pos/virtpatmat_anonfun_for.flags
index 23e3dc7d26..e69de29bb2 100644
--- a/test/files/pos/virtpatmat_anonfun_for.flags
+++ b/test/files/pos/virtpatmat_anonfun_for.flags
@@ -1 +0,0 @@
--Yvirtpatmat \ No newline at end of file
diff --git a/test/files/pos/virtpatmat_binding_opt.flags b/test/files/pos/virtpatmat_binding_opt.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_binding_opt.flags
+++ b/test/files/pos/virtpatmat_binding_opt.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_castbinder.flags b/test/files/pos/virtpatmat_castbinder.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_castbinder.flags
+++ b/test/files/pos/virtpatmat_castbinder.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_exist1.flags b/test/files/pos/virtpatmat_exist1.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_exist1.flags
+++ b/test/files/pos/virtpatmat_exist1.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_exist2.flags b/test/files/pos/virtpatmat_exist2.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_exist2.flags
+++ b/test/files/pos/virtpatmat_exist2.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_exist3.flags b/test/files/pos/virtpatmat_exist3.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_exist3.flags
+++ b/test/files/pos/virtpatmat_exist3.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_exist_uncurry.scala b/test/files/pos/virtpatmat_exist_uncurry.scala
new file mode 100644
index 0000000000..e017da6343
--- /dev/null
+++ b/test/files/pos/virtpatmat_exist_uncurry.scala
@@ -0,0 +1,6 @@
+object Test {
+ trait Leaf[T] {
+ def collect[U](f: PartialFunction[Leaf[_], U]): List[U]
+ def leaves: List[Leaf[T]] = collect { case l: Leaf[T] => l }
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/virtpatmat_gadt_array.flags b/test/files/pos/virtpatmat_gadt_array.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_gadt_array.flags
+++ b/test/files/pos/virtpatmat_gadt_array.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_infer_single_1.flags b/test/files/pos/virtpatmat_infer_single_1.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_infer_single_1.flags
+++ b/test/files/pos/virtpatmat_infer_single_1.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_instof_valuetype.flags b/test/files/pos/virtpatmat_instof_valuetype.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_instof_valuetype.flags
+++ b/test/files/pos/virtpatmat_instof_valuetype.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/pos/virtpatmat_obj_in_case.flags b/test/files/pos/virtpatmat_obj_in_case.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/pos/virtpatmat_obj_in_case.flags
+++ b/test/files/pos/virtpatmat_obj_in_case.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/presentation/callcc-interpreter/Runner.scala b/test/files/presentation/callcc-interpreter/Runner.scala
index 1ef3cf9025..61b6efd50d 100644
--- a/test/files/presentation/callcc-interpreter/Runner.scala
+++ b/test/files/presentation/callcc-interpreter/Runner.scala
@@ -1,3 +1,5 @@
import scala.tools.nsc.interactive.tests._
-object Test extends InteractiveTest \ No newline at end of file
+object Test extends InteractiveTest {
+ settings.XoldPatmat.value = true // TODO: could this be running into some kind of race condition? sometimes the match has been translated, sometimes it hasn't
+} \ No newline at end of file
diff --git a/test/files/presentation/random.check b/test/files/presentation/random.check
index fce4b69fb3..1b73720312 100644
--- a/test/files/presentation/random.check
+++ b/test/files/presentation/random.check
@@ -4,7 +4,8 @@ askType at Random.scala(18,14)
================================================================================
[response] askTypeAt at (18,14)
val filter: Int => Boolean = try {
- java.this.lang.Integer.parseInt(args.apply(0)) match {
+ case <synthetic> val x1: Int = java.this.lang.Integer.parseInt(args.apply(0));
+ x1 match {
case 1 => ((x: Int) => x.%(2).!=(0))
case 2 => ((x: Int) => x.%(2).==(0))
case _ => ((x: Int) => x.!=(0))
diff --git a/test/files/run/inline-ex-handlers.check b/test/files/run/inline-ex-handlers.check
index 7a8a744bfa..708fcc6985 100644
--- a/test/files/run/inline-ex-handlers.check
+++ b/test/files/run/inline-ex-handlers.check
@@ -1,40 +1,44 @@
172c172
-< locals: value x$1, value temp1
+< locals: value x$1, value x1
---
-> locals: value x$1, value temp1, variable boxed1
+> locals: value x$1, value x1, variable boxed1
174c174
< blocks: [1,2,3,4]
---
-> blocks: [1,2,3]
-187,189d186
-< 92 JUMP 4
-<
-< 4:
-195a193,194
+> blocks: [1,3,4]
+186a187,188
> 92 STORE_LOCAL(variable boxed1)
> 92 LOAD_LOCAL(variable boxed1)
-386c385
-< blocks: [1,2,3,4,5,7,8,10]
+195,197d196
+< 92 JUMP 2
+<
+< 2:
+385c384
+< blocks: [1,2,3,4,5,8,11,13,14,16]
---
-> blocks: [1,2,3,4,5,7,8,10,11]
-410c409,418
+> blocks: [1,2,3,5,8,11,13,14,16,17]
+409c408,417
< 103 THROW(MyException)
---
-> ? STORE_LOCAL(value ex$1)
-> ? JUMP 11
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 17
>
-> 11:
-> 101 LOAD_LOCAL(value ex$1)
-> 101 STORE_LOCAL(value temp2)
-> 101 SCOPE_ENTER value temp2
-> 101 LOAD_LOCAL(value temp2)
-> 101 IS_INSTANCE REF(class MyException)
-> 101 CZJUMP (BOOL)NE ? 4 : 5
-501c509
+> 17:
+> 101 LOAD_LOCAL(value ex5)
+> 101 STORE_LOCAL(value x3)
+> 101 SCOPE_ENTER value x3
+> 106 LOAD_LOCAL(value x3)
+> 106 IS_INSTANCE REF(class MyException)
+> 106 CZJUMP (BOOL)NE ? 5 : 11
+422,424d429
+< 101 JUMP 4
+<
+< 4:
+512c517
< blocks: [1,2,3,4,6,7,8,9,10]
---
> blocks: [1,2,3,4,6,7,8,9,10,11,12,13]
-530c538,543
+541c546,551
< 306 THROW(MyException)
---
> ? JUMP 11
@@ -43,7 +47,7 @@
> ? LOAD_LOCAL(variable monitor4)
> 305 MONITOR_EXIT
> ? JUMP 12
-536c549,555
+547c557,563
< ? THROW(Throwable)
---
> ? JUMP 12
@@ -53,7 +57,7 @@
> 304 MONITOR_EXIT
> ? STORE_LOCAL(value t)
> ? JUMP 13
-542c561,574
+553c569,582
< ? THROW(Throwable)
---
> ? STORE_LOCAL(value t)
@@ -70,19 +74,19 @@
> 310 CALL_PRIMITIVE(EndConcat)
> 310 CALL_METHOD scala.Predef.println (dynamic)
> 310 JUMP 2
-566c598
+577c606
< catch (Throwable) in ArrayBuffer(7, 8, 9, 10) starting at: 6
---
> catch (Throwable) in ArrayBuffer(7, 8, 9, 10, 11) starting at: 6
-569c601
+580c609
< catch (Throwable) in ArrayBuffer(4, 6, 7, 8, 9, 10) starting at: 3
---
> catch (Throwable) in ArrayBuffer(4, 6, 7, 8, 9, 10, 11, 12) starting at: 3
-601c633
+612c641
< blocks: [1,2,3,4,5,6,7,9,10]
---
> blocks: [1,2,3,4,5,6,7,9,10,11,12]
-625c657,663
+636c665,671
< 78 THROW(IllegalArgumentException)
---
> ? STORE_LOCAL(value e)
@@ -92,7 +96,7 @@
> 81 LOAD_LOCAL(value e)
> ? STORE_LOCAL(variable exc1)
> ? JUMP 12
-654c692,706
+665c700,714
< 81 THROW(Exception)
---
> ? STORE_LOCAL(variable exc1)
@@ -110,57 +114,53 @@
> 84 STORE_LOCAL(variable result)
> 84 LOAD_LOCAL(variable exc1)
> 84 THROW(Throwable)
-676c728
+687c736
< catch (<none>) in ArrayBuffer(4, 6, 7, 9) starting at: 3
---
> catch (<none>) in ArrayBuffer(4, 6, 7, 9, 11) starting at: 3
-702c754
-< blocks: [1,2,3,4,5,6,7,8,11,12,13,14,15,16,18,19]
+713c762
+< blocks: [1,2,3,4,5,6,9,12,14,17,18,19,22,25,27,28,30,31]
---
-> blocks: [1,2,3,4,5,6,7,8,11,12,13,14,15,16,18,19,20,21,22]
-726c778,787
+> blocks: [1,2,3,4,5,6,9,12,14,17,18,19,22,25,27,28,30,31,32,33,34]
+737c786,793
< 172 THROW(MyException)
---
-> ? STORE_LOCAL(value ex$4)
-> ? JUMP 20
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 32
>
-> 20:
-> 170 LOAD_LOCAL(value ex$4)
-> 170 STORE_LOCAL(value temp11)
-> 170 SCOPE_ENTER value temp11
-> 170 LOAD_LOCAL(value temp11)
-> 170 IS_INSTANCE REF(class MyException)
-> 170 CZJUMP (BOOL)NE ? 12 : 13
-780c841,842
+> 32:
+> 170 LOAD_LOCAL(value ex5)
+> 170 STORE_LOCAL(value x3)
+> 170 SCOPE_ENTER value x3
+> 170 JUMP 18
+793c849,850
< 177 THROW(MyException)
---
-> ? STORE_LOCAL(value ex$5)
-> ? JUMP 21
-784c846,855
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 33
+797c854,861
< 170 THROW(Throwable)
---
-> ? STORE_LOCAL(value ex$5)
-> ? JUMP 21
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 33
>
-> 21:
-> 169 LOAD_LOCAL(value ex$5)
-> 169 STORE_LOCAL(value temp14)
-> 169 SCOPE_ENTER value temp14
-> 169 LOAD_LOCAL(value temp14)
-> 169 IS_INSTANCE REF(class MyException)
-> 169 CZJUMP (BOOL)NE ? 5 : 6
-815c886,887
+> 33:
+> 169 LOAD_LOCAL(value ex5)
+> 169 STORE_LOCAL(value x3)
+> 169 SCOPE_ENTER value x3
+> 169 JUMP 5
+830c894,895
< 182 THROW(MyException)
---
> ? STORE_LOCAL(variable exc2)
-> ? JUMP 22
-819c891,905
+> ? JUMP 34
+834c899,900
< 169 THROW(Throwable)
---
> ? STORE_LOCAL(variable exc2)
-> ? JUMP 22
->
-> 22:
+> ? JUMP 34
+835a902,914
+> 34:
> 184 LOAD_MODULE object Predef
> 184 CONSTANT("finally")
> 184 CALL_METHOD scala.Predef.println (dynamic)
@@ -172,57 +172,60 @@
> 185 STORE_LOCAL(variable result)
> 185 LOAD_LOCAL(variable exc2)
> 185 THROW(Throwable)
-841c927
-< catch (Throwable) in ArrayBuffer(11, 12, 13, 14, 15, 16, 18) starting at: 4
+>
+856c935
+< catch (Throwable) in ArrayBuffer(17, 18, 19, 22, 25, 27, 28, 30) starting at: 4
---
-> catch (Throwable) in ArrayBuffer(11, 12, 13, 14, 15, 16, 18, 20) starting at: 4
-844c930
-< catch (<none>) in ArrayBuffer(4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 18) starting at: 3
+> catch (Throwable) in ArrayBuffer(17, 18, 19, 22, 25, 27, 28, 30, 32) starting at: 4
+859c938
+< catch (<none>) in ArrayBuffer(4, 5, 6, 9, 12, 17, 18, 19, 22, 25, 27, 28, 30) starting at: 3
---
-> catch (<none>) in ArrayBuffer(4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 18, 20, 21) starting at: 3
-870c956
-< blocks: [1,2,3,6,7,8,10,11,13]
+> catch (<none>) in ArrayBuffer(4, 5, 6, 9, 12, 17, 18, 19, 22, 25, 27, 28, 30, 32, 33) starting at: 3
+885c964
+< blocks: [1,2,3,6,7,8,11,14,16,17,19]
---
-> blocks: [1,2,3,6,7,8,10,11,13,14]
-894c980,989
+> blocks: [1,2,3,6,7,8,11,14,16,17,19,20]
+909c988,995
< 124 THROW(MyException)
---
-> ? STORE_LOCAL(value ex$2)
-> ? JUMP 14
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 20
>
-> 14:
-> 122 LOAD_LOCAL(value ex$2)
-> 122 STORE_LOCAL(value temp5)
-> 122 SCOPE_ENTER value temp5
-> 122 LOAD_LOCAL(value temp5)
-> 122 IS_INSTANCE REF(class MyException)
-> 122 CZJUMP (BOOL)NE ? 7 : 8
-942c1037
-< catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 10, 11, 13) starting at: 3
----
-> catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 10, 11, 13, 14) starting at: 3
-968c1063
-< blocks: [1,2,3,4,5,9,10,11,13]
----
-> blocks: [1,2,3,4,5,9,10,11,13,14]
-992c1087,1096
+> 20:
+> 122 LOAD_LOCAL(value ex5)
+> 122 STORE_LOCAL(value x3)
+> 122 SCOPE_ENTER value x3
+> 122 JUMP 7
+969c1055
+< catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 11, 14, 16, 17, 19) starting at: 3
+---
+> catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 11, 14, 16, 17, 19, 20) starting at: 3
+995c1081
+< blocks: [1,2,3,4,5,8,11,15,16,17,19]
+---
+> blocks: [1,2,3,5,8,11,15,16,17,19,20]
+1019c1105,1114
< 148 THROW(MyException)
---
-> ? STORE_LOCAL(value ex$3)
-> ? JUMP 14
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 20
>
-> 14:
-> 145 LOAD_LOCAL(value ex$3)
-> 145 STORE_LOCAL(value temp8)
-> 145 SCOPE_ENTER value temp8
-> 145 LOAD_LOCAL(value temp8)
-> 145 IS_INSTANCE REF(class MyException)
-> 145 CZJUMP (BOOL)NE ? 4 : 5
-1236c1340
+> 20:
+> 145 LOAD_LOCAL(value ex5)
+> 145 STORE_LOCAL(value x3)
+> 145 SCOPE_ENTER value x3
+> 154 LOAD_LOCAL(value x3)
+> 154 IS_INSTANCE REF(class MyException)
+> 154 CZJUMP (BOOL)NE ? 5 : 11
+1040,1042d1134
+< 145 JUMP 4
+<
+< 4:
+1275c1367
< blocks: [1,2,3,4,5,7]
---
> blocks: [1,2,3,4,5,7,8]
-1260c1364,1371
+1299c1391,1398
< 38 THROW(IllegalArgumentException)
---
> ? STORE_LOCAL(value e)
@@ -233,33 +236,37 @@
> 42 CONSTANT("IllegalArgumentException")
> 42 CALL_METHOD scala.Predef.println (dynamic)
> 42 JUMP 2
-1309c1420
-< blocks: [1,2,3,4,5,7,8,10,11,13]
+1348c1447
+< blocks: [1,2,3,4,5,8,11,13,14,16,17,19]
---
-> blocks: [1,2,3,4,5,7,8,10,11,13,14]
-1333c1444,1445
+> blocks: [1,2,3,5,8,11,13,14,16,17,19,20]
+1372c1471,1472
< 203 THROW(MyException)
---
-> ? STORE_LOCAL(value ex$6)
-> ? JUMP 14
-1353c1465,1474
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 20
+1392c1492,1501
< 209 THROW(MyException)
---
-> ? STORE_LOCAL(value ex$6)
-> ? JUMP 14
+> ? STORE_LOCAL(value ex5)
+> ? JUMP 20
>
-> 14:
-> 200 LOAD_LOCAL(value ex$6)
-> 200 STORE_LOCAL(value temp17)
-> 200 SCOPE_ENTER value temp17
-> 200 LOAD_LOCAL(value temp17)
-> 200 IS_INSTANCE REF(class MyException)
-> 200 CZJUMP (BOOL)NE ? 4 : 5
-1416c1537
+> 20:
+> 200 LOAD_LOCAL(value ex5)
+> 200 STORE_LOCAL(value x3)
+> 200 SCOPE_ENTER value x3
+> 212 LOAD_LOCAL(value x3)
+> 212 IS_INSTANCE REF(class MyException)
+> 212 CZJUMP (BOOL)NE ? 5 : 11
+1405,1407d1513
+< 200 JUMP 4
+<
+< 4:
+1467c1573
< blocks: [1,2,3,4,5,7]
---
> blocks: [1,2,3,4,5,7,8]
-1440c1561,1568
+1491c1597,1604
< 58 THROW(IllegalArgumentException)
---
> ? STORE_LOCAL(value e)
@@ -270,11 +277,11 @@
> 62 CONSTANT("RuntimeException")
> 62 CALL_METHOD scala.Predef.println (dynamic)
> 62 JUMP 2
-1489c1617
+1540c1653
< blocks: [1,2,3,4]
---
> blocks: [1,2,3,4,5]
-1509c1637,1642
+1560c1673,1678
< 229 THROW(MyException)
---
> ? JUMP 5
@@ -283,19 +290,19 @@
> ? LOAD_LOCAL(variable monitor1)
> 228 MONITOR_EXIT
> 228 THROW(Throwable)
-1515c1648
+1566c1684
< ? THROW(Throwable)
---
> 228 THROW(Throwable)
-1543c1676
+1594c1712
< locals: value args, variable result, variable monitor2, variable monitorResult1
---
> locals: value exception$1, value args, variable result, variable monitor2, variable monitorResult1
-1545c1678
+1596c1714
< blocks: [1,2,3,4]
---
> blocks: [1,2,3,4,5]
-1568c1701,1709
+1619c1737,1745
< 245 THROW(MyException)
---
> ? STORE_LOCAL(value exception$1)
@@ -307,7 +314,7 @@
> ? LOAD_LOCAL(variable monitor2)
> 244 MONITOR_EXIT
> 244 THROW(Throwable)
-1574c1715
+1625c1751
< ? THROW(Throwable)
---
> 244 THROW(Throwable)
diff --git a/test/files/run/macro-reflective-mamd-normal-mi.check b/test/files/run/macro-reflective-mamd-normal-mi.check
new file mode 100644
index 0000000000..ac4213d6e9
--- /dev/null
+++ b/test/files/run/macro-reflective-mamd-normal-mi.check
@@ -0,0 +1 @@
+43 \ No newline at end of file
diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala b/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala
index dc7d42d23e..dc7d42d23e 100644
--- a/test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala
+++ b/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala
diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala b/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
index 7cbe425fc8..cf34f1685d 100644
--- a/test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
+++ b/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
@@ -12,5 +12,6 @@ object Test extends App {
val module = ModuleDef(NoMods, newTermName("Macros"), Template(Nil, emptyValDef, List(modulector, macrodef)))
val macroapp = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42))))
val tree = Block(macrodef, module, macroapp)
- println(tree.eval)
+ val toolbox = mkToolBox(options = "-language:experimental.macros")
+ println(toolbox.runExpr(tree))
}
diff --git a/test/files/run/patmat_unapp_abstype.check b/test/files/run/patmat_unapp_abstype.check
index ac28ccdb95..72239d16cd 100644
--- a/test/files/run/patmat_unapp_abstype.check
+++ b/test/files/run/patmat_unapp_abstype.check
@@ -1,2 +1,4 @@
TypeRef
none of the above
+Bar
+Foo
diff --git a/test/files/run/patmat_unapp_abstype.flags b/test/files/run/patmat_unapp_abstype.flags
new file mode 100644
index 0000000000..ba80cad69b
--- /dev/null
+++ b/test/files/run/patmat_unapp_abstype.flags
@@ -0,0 +1 @@
+-Xoldpatmat
diff --git a/test/files/run/patmat_unapp_abstype.scala b/test/files/run/patmat_unapp_abstype.scala
index e5adec5c16..45496f08a2 100644
--- a/test/files/run/patmat_unapp_abstype.scala
+++ b/test/files/run/patmat_unapp_abstype.scala
@@ -19,6 +19,11 @@ trait TypesUser extends TypesAPI {
def shouldNotCrash(tp: Type): Unit = {
tp match {
case TypeRef(x) => println("TypeRef")
+ // the above checks tp.isInstanceOf[TypeRef], which is erased to tp.isInstanceOf[Type]
+ // before calling TypeRef.unapply(tp), which will then crash unless tp.isInstanceOf[TypesImpl#TypeRef] (which is not implied by tp.isInstanceOf[Type])
+ // tp.isInstanceOf[TypesImpl#TypeRef] is equivalent to classOf[TypesImpl#TypeRef].isAssignableFrom(tp.getClass)
+ // this is equivalent to manifest
+ // it is NOT equivalent to manifest[Type] <:< typeRefMani
case MethodType(x) => println("MethodType")
case _ => println("none of the above")
}
@@ -32,8 +37,47 @@ trait TypesImpl extends TypesAPI {
//lazy val typeRefMani = manifest[TypeRef]
}
-object Test extends TypesImpl with TypesUser with App {
- shouldNotCrash(TypeRef(10)) // should and does print "TypeRef"
- // once #1697/#2337 are fixed, this should generate the correct output
- shouldNotCrash(MethodType(10)) // should print "MethodType" but prints "none of the above" -- good one, pattern matcher!
-} \ No newline at end of file
+trait Foos {
+ trait Bar
+ type Foo <: Bar
+ trait FooExtractor {
+ def unapply(foo: Foo): Option[Int]
+ }
+ val Foo: FooExtractor
+}
+
+trait RealFoos extends Foos {
+ class Foo(val x: Int) extends Bar
+ object Foo extends FooExtractor {
+ def unapply(foo: Foo): Option[Int] = Some(foo.x)
+ }
+}
+
+trait Intermed extends Foos {
+ def crash(bar: Bar): Unit =
+ bar match {
+ case Foo(x) => println("Foo")
+ case _ => println("Bar")
+ }
+}
+
+object TestUnappStaticallyKnownSynthetic extends TypesImpl with TypesUser {
+ def test() = {
+ shouldNotCrash(TypeRef(10)) // should and does print "TypeRef"
+ // once #1697/#2337 are fixed, this should generate the correct output
+ shouldNotCrash(MethodType(10)) // should print "MethodType" but prints "none of the above" -- good one, pattern matcher!
+ }
+}
+
+object TestUnappDynamicSynth extends RealFoos with Intermed {
+ case class FooToo(n: Int) extends Bar
+ def test() = {
+ crash(FooToo(10))
+ crash(new Foo(5))
+ }
+}
+
+object Test extends App {
+ TestUnappStaticallyKnownSynthetic.test()
+ TestUnappDynamicSynth.test()
+}
diff --git a/test/files/run/reify_fors.flags b/test/files/run/reify_fors.flags
new file mode 100644
index 0000000000..ba80cad69b
--- /dev/null
+++ b/test/files/run/reify_fors.flags
@@ -0,0 +1 @@
+-Xoldpatmat
diff --git a/test/files/run/reify_maps.flags b/test/files/run/reify_maps.flags
new file mode 100644
index 0000000000..ba80cad69b
--- /dev/null
+++ b/test/files/run/reify_maps.flags
@@ -0,0 +1 @@
+-Xoldpatmat
diff --git a/test/files/run/repl-suppressed-warnings.scala b/test/files/run/repl-suppressed-warnings.scala
index a78b00f36e..9afbbaf1a5 100644
--- a/test/files/run/repl-suppressed-warnings.scala
+++ b/test/files/run/repl-suppressed-warnings.scala
@@ -1,6 +1,7 @@
import scala.tools.partest.ReplTest
object Test extends ReplTest {
+ override def extraSettings = "-Xoldpatmat"
def code = """
// "Is this thing on?" Not working on first couple
diff --git a/test/files/run/t2886.check b/test/files/run/t2886.check
index 5fe1e73a45..8d97a82799 100644
--- a/test/files/run/t2886.check
+++ b/test/files/run/t2886.check
@@ -1,5 +1,5 @@
-((x: scala.Predef.String) => {
- val x$1 = x;
- val x$2 = x;
- Test.test(x$2, x$1)
-})
+((x: String) => {
+ val x$1 = x;
+ val x$2 = x;
+ Test.this.test(x$2, x$1)
+})
diff --git a/test/files/run/t2886.scala b/test/files/run/t2886.scala
new file mode 100644
index 0000000000..e0835a0a44
--- /dev/null
+++ b/test/files/run/t2886.scala
@@ -0,0 +1,9 @@
+import scala.reflect.mirror._
+
+object Test {
+ def test(name: String, address: String) = null
+ def main(args: Array[String]) = {
+ val tree = reify((x:String) => test(address=x,name=x)).tree
+ println(tree)
+ }
+}
diff --git a/test/files/run/t5273_1.flags b/test/files/run/t5273_1.flags
new file mode 100644
index 0000000000..ba80cad69b
--- /dev/null
+++ b/test/files/run/t5273_1.flags
@@ -0,0 +1 @@
+-Xoldpatmat
diff --git a/test/files/run/t5273_2a.flags b/test/files/run/t5273_2a.flags
new file mode 100644
index 0000000000..ba80cad69b
--- /dev/null
+++ b/test/files/run/t5273_2a.flags
@@ -0,0 +1 @@
+-Xoldpatmat
diff --git a/test/files/run/t5273_2b.flags b/test/files/run/t5273_2b.flags
new file mode 100644
index 0000000000..ba80cad69b
--- /dev/null
+++ b/test/files/run/t5273_2b.flags
@@ -0,0 +1 @@
+-Xoldpatmat
diff --git a/test/files/run/virtpatmat_alts.flags b/test/files/run/virtpatmat_alts.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_alts.flags
+++ b/test/files/run/virtpatmat_alts.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_apply.flags b/test/files/run/virtpatmat_apply.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_apply.flags
+++ b/test/files/run/virtpatmat_apply.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_casting.flags b/test/files/run/virtpatmat_casting.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_casting.flags
+++ b/test/files/run/virtpatmat_casting.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_extends_product.flags b/test/files/run/virtpatmat_extends_product.flags
index ac6b805bd0..8b13789179 100644
--- a/test/files/run/virtpatmat_extends_product.flags
+++ b/test/files/run/virtpatmat_extends_product.flags
@@ -1 +1 @@
--Yvirtpatmat
+
diff --git a/test/files/run/virtpatmat_literal.flags b/test/files/run/virtpatmat_literal.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_literal.flags
+++ b/test/files/run/virtpatmat_literal.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_nested_lists.flags b/test/files/run/virtpatmat_nested_lists.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_nested_lists.flags
+++ b/test/files/run/virtpatmat_nested_lists.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_npe.flags b/test/files/run/virtpatmat_npe.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_npe.flags
+++ b/test/files/run/virtpatmat_npe.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_opt_sharing.flags b/test/files/run/virtpatmat_opt_sharing.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_opt_sharing.flags
+++ b/test/files/run/virtpatmat_opt_sharing.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_partial.flags b/test/files/run/virtpatmat_partial.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_partial.flags
+++ b/test/files/run/virtpatmat_partial.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_staging.flags b/test/files/run/virtpatmat_staging.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_staging.flags
+++ b/test/files/run/virtpatmat_staging.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_stringinterp.check b/test/files/run/virtpatmat_stringinterp.check
new file mode 100644
index 0000000000..7927f4f2d9
--- /dev/null
+++ b/test/files/run/virtpatmat_stringinterp.check
@@ -0,0 +1 @@
+Node(1)
diff --git a/test/files/run/virtpatmat_stringinterp.flags b/test/files/run/virtpatmat_stringinterp.flags
new file mode 100644
index 0000000000..e1b37447c9
--- /dev/null
+++ b/test/files/run/virtpatmat_stringinterp.flags
@@ -0,0 +1 @@
+-Xexperimental \ No newline at end of file
diff --git a/test/files/run/virtpatmat_stringinterp.scala b/test/files/run/virtpatmat_stringinterp.scala
new file mode 100644
index 0000000000..213712f17a
--- /dev/null
+++ b/test/files/run/virtpatmat_stringinterp.scala
@@ -0,0 +1,13 @@
+object Test extends App {
+ case class Node(x: Int)
+
+ implicit def sc2xml(sc: StringContext): XMLContext = new XMLContext(sc)
+ class XMLContext(sc: StringContext) {
+ object xml {
+ def unapplySeq(xml: Node): Option[Seq[Node]] = Some(List(Node(1)))
+ }
+ }
+
+ val x: Node = Node(0)
+ x match { case xml"""<foo arg=$a/>""" => println(a) }
+} \ No newline at end of file
diff --git a/test/files/run/virtpatmat_switch.flags b/test/files/run/virtpatmat_switch.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_switch.flags
+++ b/test/files/run/virtpatmat_switch.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_tailcalls_verifyerror.flags b/test/files/run/virtpatmat_tailcalls_verifyerror.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_tailcalls_verifyerror.flags
+++ b/test/files/run/virtpatmat_tailcalls_verifyerror.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_try.flags b/test/files/run/virtpatmat_try.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_try.flags
+++ b/test/files/run/virtpatmat_try.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_typed.flags b/test/files/run/virtpatmat_typed.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_typed.flags
+++ b/test/files/run/virtpatmat_typed.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_unapply.flags b/test/files/run/virtpatmat_unapply.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_unapply.flags
+++ b/test/files/run/virtpatmat_unapply.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_unapplyprod.flags b/test/files/run/virtpatmat_unapplyprod.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_unapplyprod.flags
+++ b/test/files/run/virtpatmat_unapplyprod.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/run/virtpatmat_unapplyseq.flags b/test/files/run/virtpatmat_unapplyseq.flags
index 9769db9257..3f5a3100e4 100644
--- a/test/files/run/virtpatmat_unapplyseq.flags
+++ b/test/files/run/virtpatmat_unapplyseq.flags
@@ -1 +1 @@
- -Yvirtpatmat -Xexperimental
+ -Xexperimental
diff --git a/test/files/specialized/spec-patmatch.check b/test/files/specialized/spec-patmatch.check
index 33306ab5d9..a2746c0f48 100644
--- a/test/files/specialized/spec-patmatch.check
+++ b/test/files/specialized/spec-patmatch.check
@@ -17,4 +17,4 @@ long
double
float
default
-2 \ No newline at end of file
+10