summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-11-24 10:17:40 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2015-11-24 10:17:40 +0100
commit86300fe1b3ab87b2e40616ed78709e8f03e707b5 (patch)
tree4458169015b02ecf7e29f805d0dbd6645171620a /test/files
parent3d0cbf9d10416fab8017b5fb46af44f59ee89fd1 (diff)
parent8eb1d4c29d85aef7828eeb35169e80c085cea93e (diff)
downloadscala-86300fe1b3ab87b2e40616ed78709e8f03e707b5.tar.gz
scala-86300fe1b3ab87b2e40616ed78709e8f03e707b5.tar.bz2
scala-86300fe1b3ab87b2e40616ed78709e8f03e707b5.zip
Merge commit '8eb1d4c' into merge-2.11-to-2.12-nov-24
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/depmet_1.check4
-rw-r--r--test/files/neg/macro-without-xmacros-a.check2
-rw-r--r--test/files/neg/macro-without-xmacros-b.check2
-rw-r--r--test/files/neg/t6040.check2
-rw-r--r--test/files/neg/t6120.check2
-rw-r--r--test/files/neg/t6952.check2
-rw-r--r--test/files/neg/t8736-c.check2
-rw-r--r--test/files/pos/existental-slow-compile2.scala7
-rw-r--r--test/files/pos/existential-slow-compile1.flags1
-rw-r--r--test/files/pos/existential-slow-compile1.scala7
-rw-r--r--test/files/run/t3647.check1
-rw-r--r--test/files/run/t4950.check7
-rw-r--r--test/files/run/t4950.scala24
-rw-r--r--test/files/run/t7634.check4
-rw-r--r--test/files/run/t7634.scala2
15 files changed, 45 insertions, 24 deletions
diff --git a/test/files/neg/depmet_1.check b/test/files/neg/depmet_1.check
index 7a4f845fd5..15498568c5 100644
--- a/test/files/neg/depmet_1.check
+++ b/test/files/neg/depmet_1.check
@@ -1,7 +1,7 @@
-depmet_1.scala:2: error: illegal dependent method type: parameter appears in the type of another parameter in the same section or an earlier one
+depmet_1.scala:2: error: illegal dependent method type: parameter may only be referenced in a subsequent parameter section
def precise0(y: x.type)(x: String): Unit = {}
^
-depmet_1.scala:3: error: illegal dependent method type: parameter appears in the type of another parameter in the same section or an earlier one
+depmet_1.scala:3: error: illegal dependent method type: parameter may only be referenced in a subsequent parameter section
def precise1(x: String, y: x.type): Unit = {}
^
depmet_1.scala:4: error: not found: value y
diff --git a/test/files/neg/macro-without-xmacros-a.check b/test/files/neg/macro-without-xmacros-a.check
index ec194be3a9..65445d80dd 100644
--- a/test/files/neg/macro-without-xmacros-a.check
+++ b/test/files/neg/macro-without-xmacros-a.check
@@ -2,7 +2,7 @@ Macros_2.scala:5: error: macro definition needs to be enabled
by making the implicit value scala.language.experimental.macros visible.
This can be achieved by adding the import clause 'import scala.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
+See the Scaladoc 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
^
diff --git a/test/files/neg/macro-without-xmacros-b.check b/test/files/neg/macro-without-xmacros-b.check
index c97850f0a9..e3c1010d50 100644
--- a/test/files/neg/macro-without-xmacros-b.check
+++ b/test/files/neg/macro-without-xmacros-b.check
@@ -2,7 +2,7 @@ Macros_2.scala:3: error: macro definition needs to be enabled
by making the implicit value scala.language.experimental.macros visible.
This can be achieved by adding the import clause 'import scala.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
+See the Scaladoc 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
^
diff --git a/test/files/neg/t6040.check b/test/files/neg/t6040.check
index 16c90ede7e..350f796d18 100644
--- a/test/files/neg/t6040.check
+++ b/test/files/neg/t6040.check
@@ -2,7 +2,7 @@ t6040.scala:1: error: extension of type scala.Dynamic needs to be enabled
by making the implicit value scala.language.dynamics visible.
This can be achieved by adding the import clause 'import scala.language.dynamics'
or by setting the compiler option -language:dynamics.
-See the Scala docs for value scala.language.dynamics for a discussion
+See the Scaladoc for value scala.language.dynamics for a discussion
why the feature needs to be explicitly enabled.
class X extends Dynamic
^
diff --git a/test/files/neg/t6120.check b/test/files/neg/t6120.check
index a7d17e29cf..f432fde32f 100644
--- a/test/files/neg/t6120.check
+++ b/test/files/neg/t6120.check
@@ -2,7 +2,7 @@ t6120.scala:5: warning: postfix operator bippy should be enabled
by making the implicit value scala.language.postfixOps visible.
This can be achieved by adding the import clause 'import scala.language.postfixOps'
or by setting the compiler option -language:postfixOps.
-See the Scala docs for value scala.language.postfixOps for a discussion
+See the Scaladoc for value scala.language.postfixOps for a discussion
why the feature should be explicitly enabled.
def f = null == null bippy
^
diff --git a/test/files/neg/t6952.check b/test/files/neg/t6952.check
index 1a591d02c6..acee0e7d60 100644
--- a/test/files/neg/t6952.check
+++ b/test/files/neg/t6952.check
@@ -2,7 +2,7 @@ t6952.scala:2: error: extension of type scala.Dynamic needs to be enabled
by making the implicit value scala.language.dynamics visible.
This can be achieved by adding the import clause 'import scala.language.dynamics'
or by setting the compiler option -language:dynamics.
-See the Scala docs for value scala.language.dynamics for a discussion
+See the Scaladoc for value scala.language.dynamics for a discussion
why the feature needs to be explicitly enabled.
trait B extends Dynamic
^
diff --git a/test/files/neg/t8736-c.check b/test/files/neg/t8736-c.check
index 06b2228543..7debb6d515 100644
--- a/test/files/neg/t8736-c.check
+++ b/test/files/neg/t8736-c.check
@@ -2,7 +2,7 @@ t8736-c.scala:4: warning: higher-kinded type should be enabled
by making the implicit value scala.language.higherKinds visible.
This can be achieved by adding the import clause 'import scala.language.higherKinds'
or by setting the compiler option -language:higherKinds.
-See the Scala docs for value scala.language.higherKinds for a discussion
+See the Scaladoc for value scala.language.higherKinds for a discussion
why the feature should be explicitly enabled.
def hk[M[_]] = ???
^
diff --git a/test/files/pos/existental-slow-compile2.scala b/test/files/pos/existental-slow-compile2.scala
new file mode 100644
index 0000000000..907344982c
--- /dev/null
+++ b/test/files/pos/existental-slow-compile2.scala
@@ -0,0 +1,7 @@
+class C {
+ class L[+A]
+ def test = {
+ val foo:
+ L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: _ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: _ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_]]]]]]]]]]]]]]]]]]]]]]]]
+ = ??? } }
+
diff --git a/test/files/pos/existential-slow-compile1.flags b/test/files/pos/existential-slow-compile1.flags
new file mode 100644
index 0000000000..7f7581974d
--- /dev/null
+++ b/test/files/pos/existential-slow-compile1.flags
@@ -0,0 +1 @@
+-Ystop-after:refchecks
diff --git a/test/files/pos/existential-slow-compile1.scala b/test/files/pos/existential-slow-compile1.scala
new file mode 100644
index 0000000000..8602afd9db
--- /dev/null
+++ b/test/files/pos/existential-slow-compile1.scala
@@ -0,0 +1,7 @@
+class C {
+ type L[+A] = scala.collection.immutable.List[A]
+ def test = {
+ val foo:
+ L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: _ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: _ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_ <: L[_]]]]]]]]]]]]]]]]]]]]]]]]
+ = ??? } }
+
diff --git a/test/files/run/t3647.check b/test/files/run/t3647.check
new file mode 100644
index 0000000000..e5c1ee1701
--- /dev/null
+++ b/test/files/run/t3647.check
@@ -0,0 +1 @@
+warning: there were three deprecation warnings; re-run with -deprecation for details
diff --git a/test/files/run/t4950.check b/test/files/run/t4950.check
deleted file mode 100644
index 8994441163..0000000000
--- a/test/files/run/t4950.check
+++ /dev/null
@@ -1,7 +0,0 @@
-
-scala> val 1 = 2
-scala.MatchError: 2 (of class java.lang.Integer)
-
-scala> val List(1) = List(1)
-
-scala> :quit
diff --git a/test/files/run/t4950.scala b/test/files/run/t4950.scala
index cef06027bf..e34b2cf3f2 100644
--- a/test/files/run/t4950.scala
+++ b/test/files/run/t4950.scala
@@ -1,12 +1,24 @@
-import scala.tools.partest.ReplTest
+import scala.tools.partest.SessionTest
+import scala.PartialFunction.{ cond => when }
+
+object Elision {
+ val elideMsg = """ ... \d+ elided""".r
+}
+
+object Test extends SessionTest {
+ import Elision._
-object Test extends ReplTest {
// Filter out the abbreviated stacktrace "... X elided"
// because the number seems to differ between versions/platforms/...
- override def show = eval() filterNot (_ contains "elided") foreach println
- def code =
+ def elided(s: String) = when(s) { case elideMsg() => true }
+ override def eval() = super.eval() filterNot elided
+ def session =
"""
-val 1 = 2
-val List(1) = List(1)
+scala> val 1 = 2
+scala.MatchError: 2 (of class java.lang.Integer)
+
+scala> val List(1) = List(1)
+
+scala> :quit
"""
}
diff --git a/test/files/run/t7634.check b/test/files/run/t7634.check
index 879aea67a2..43128cad95 100644
--- a/test/files/run/t7634.check
+++ b/test/files/run/t7634.check
@@ -1,6 +1,6 @@
-scala> .lines
-res1: List[String] = List(shello, world.)
+scala> .lines.foreach(println)
+shello, world.
scala> :quit
diff --git a/test/files/run/t7634.scala b/test/files/run/t7634.scala
index aeb6a5e671..9520931941 100644
--- a/test/files/run/t7634.scala
+++ b/test/files/run/t7634.scala
@@ -9,7 +9,7 @@ import scala.util.Properties.propOrElse
object Test extends ReplTest {
def java = propOrElse("javacmd", "java")
def code = s""":sh $java -classpath $testOutput hello.Hello
- |.lines""".stripMargin
+ |.lines.foreach(println)""".stripMargin
}
package hello {