summaryrefslogtreecommitdiff
path: root/test/files/run/t6200.scala
diff options
context:
space:
mode:
authorRex Kerr <ichoran@gmail.com>2014-01-15 16:12:55 -0800
committerRex Kerr <ichoran@gmail.com>2014-01-15 16:12:55 -0800
commit9c5e7f389315fc5c2c893702bf78748342f9f61e (patch)
treedabca228ae45162e0e36b784c44952cd1c87f9a0 /test/files/run/t6200.scala
parentdddf1f5a79b1f00b6b173439f3df9e9d2f82af3b (diff)
downloadscala-9c5e7f389315fc5c2c893702bf78748342f9f61e.tar.gz
scala-9c5e7f389315fc5c2c893702bf78748342f9f61e.tar.bz2
scala-9c5e7f389315fc5c2c893702bf78748342f9f61e.zip
Repairs unexpected failure of test t6200.scala
Added extra ()'s to get rid of deprecation warning for inferring unit arg.
Diffstat (limited to 'test/files/run/t6200.scala')
-rw-r--r--test/files/run/t6200.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/t6200.scala b/test/files/run/t6200.scala
index 02659c26bc..9a5d91e042 100644
--- a/test/files/run/t6200.scala
+++ b/test/files/run/t6200.scala
@@ -10,7 +10,7 @@ object Test extends App {
def testCorrectness[T: Ordering](n: Int, mkKey: Int => T) {
val o = implicitly[Ordering[T]]
- val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) ->())
+ val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) -> (()))
for (i <- 0 until n) {
val ki = mkKey(i)
val a = s.filter(kv => o.lt(kv._1, ki))
@@ -24,7 +24,7 @@ object Test extends App {
// I could not come up with a simple test that tests structural sharing when only parts are reused, but
// at least this fails with the old and passes with the new implementation
def testSharing() {
- val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ ->())
+ val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ -> (()))
require(s.filter(_ => true) eq s)
require(s.filterNot(_ => false) eq s)
}
@@ -50,7 +50,7 @@ object Test extends App {
}
}
- val s = HashMap.empty[HashCounter, Unit] ++ (0 until 100).map(k => HashCounter(k) ->())
+ val s = HashMap.empty[HashCounter, Unit] ++ (0 until 100).map(k => HashCounter(k) -> (()))
val hashCount0 = hashCount
val equalsCount0 = equalsCount
val t = s.filter(_._1 < HashCounter(50))