summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/partialfun.scala2
-rw-r--r--test/files/run/t5629b.check2
-rw-r--r--test/files/run/t5629b.scala7
-rw-r--r--test/files/run/t576.check1
-rw-r--r--test/files/run/t6662/Test_2.scala2
-rw-r--r--test/files/run/t6863.check1
-rw-r--r--test/files/run/t6935.check1
-rw-r--r--test/files/run/t6935.scala18
8 files changed, 16 insertions, 18 deletions
diff --git a/test/files/run/partialfun.scala b/test/files/run/partialfun.scala
index f3c53b94ae..71c7d3e61c 100644
--- a/test/files/run/partialfun.scala
+++ b/test/files/run/partialfun.scala
@@ -76,7 +76,7 @@ object Test {
}
val chained = pf0 orElse pf1 orElse pf2
- chained()
+ chained(())
}
def main(args: Array[String]): Unit = {
diff --git a/test/files/run/t5629b.check b/test/files/run/t5629b.check
index 1bc0248c3d..e0f25f0b05 100644
--- a/test/files/run/t5629b.check
+++ b/test/files/run/t5629b.check
@@ -2,7 +2,7 @@
MySmartPF.apply entered...
newPF.applyOrElse entered...
default
-scala.MatchError: () (of class scala.runtime.BoxedUnit)
+scala.MatchError: 1 (of class java.lang.Integer)
=== pf(42):
MySmartPF.apply entered...
newPF.applyOrElse entered...
diff --git a/test/files/run/t5629b.scala b/test/files/run/t5629b.scala
index 9ff29c8d89..5d402201ae 100644
--- a/test/files/run/t5629b.scala
+++ b/test/files/run/t5629b.scala
@@ -1,8 +1,3 @@
-
-
-
-
-
object Test extends App {
trait MyPF[@specialized(Int) -A] extends (A => Unit) {
@@ -16,7 +11,7 @@ object Test extends App {
trait MySmartPF[@specialized(Int) -A] extends MyPF[A] {
def apply(x: A): Unit = {
println("MySmartPF.apply entered...")
- applyOrElse(x, { _: Any => throw new MatchError })
+ applyOrElse(x, { default: Any => throw new MatchError(default) })
}
}
diff --git a/test/files/run/t576.check b/test/files/run/t576.check
index 8a1218a102..6458d5d743 100644
--- a/test/files/run/t576.check
+++ b/test/files/run/t576.check
@@ -1,3 +1,4 @@
+warning: there were 1 deprecation warning(s); re-run with -deprecation for details
1
2
3
diff --git a/test/files/run/t6662/Test_2.scala b/test/files/run/t6662/Test_2.scala
index 03a80b655a..82ac54cb46 100644
--- a/test/files/run/t6662/Test_2.scala
+++ b/test/files/run/t6662/Test_2.scala
@@ -2,7 +2,7 @@
object Test {
def main(args: Array[String]) {
- val s = Demo id ()
+ val s = Demo id (())
println(s)
}
}
diff --git a/test/files/run/t6863.check b/test/files/run/t6863.check
index 030cb8b265..fea22b582f 100644
--- a/test/files/run/t6863.check
+++ b/test/files/run/t6863.check
@@ -10,3 +10,4 @@ t6863.scala:46: warning: comparing values of types Unit and Unit using `==' will
t6863.scala:59: warning: comparing values of types Unit and Unit using `==' will always yield true
assert({ () => x }.apply == ())
^
+warning: there were 4 deprecation warning(s); re-run with -deprecation for details
diff --git a/test/files/run/t6935.check b/test/files/run/t6935.check
new file mode 100644
index 0000000000..844ca54682
--- /dev/null
+++ b/test/files/run/t6935.check
@@ -0,0 +1 @@
+warning: there were 1 deprecation warning(s); re-run with -deprecation for details
diff --git a/test/files/run/t6935.scala b/test/files/run/t6935.scala
index dea2d7f2e2..fdaf02e5ce 100644
--- a/test/files/run/t6935.scala
+++ b/test/files/run/t6935.scala
@@ -1,14 +1,14 @@
object Test {
def main(args: Array[String]): Unit = {
- import java.io._
- val bytes = new ByteArrayOutputStream()
- val out = new ObjectOutputStream(bytes)
- out.writeObject(())
- out.close()
- val buf = bytes.toByteArray
- val in = new ObjectInputStream(new ByteArrayInputStream(buf))
- val unit = in.readObject()
- assert(unit == ())
+ import java.io._
+ val bytes = new ByteArrayOutputStream()
+ val out = new ObjectOutputStream(bytes)
+ out.writeObject(())
+ out.close()
+ val buf = bytes.toByteArray
+ val in = new ObjectInputStream(new ByteArrayInputStream(buf))
+ val unit = in.readObject()
+ assert(unit == ())
}
}