summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-04-20 01:00:24 +0100
committerPaul Phillips <paulp@improving.org>2012-04-24 19:59:27 -0700
commit1d0372f84f9a7325a47beb55169cc454895ef74b (patch)
tree920b95193b2cbb63b75517d67c668eda1d563a06 /test/files
parent211df62491ada71a4a574fd2314942ab3c4a4ba8 (diff)
downloadscala-1d0372f84f9a7325a47beb55169cc454895ef74b.tar.gz
scala-1d0372f84f9a7325a47beb55169cc454895ef74b.tar.bz2
scala-1d0372f84f9a7325a47beb55169cc454895ef74b.zip
Moved ancillary methods off specialized traits.
Moved compose/andThen off Function1, curried/tupled off Function2. Pushed Tuple2 zipped into auxiliary class. Created implicits to plaster over the changes. This drops several hundred classfiles and takes (unoptimized) scala-library.jar from 7.8 Mb to 7.4 Mb.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t5067.check8
-rw-r--r--test/files/neg/t5067.scala6
-rw-r--r--test/files/run/tuple-zipped.scala2
3 files changed, 8 insertions, 8 deletions
diff --git a/test/files/neg/t5067.check b/test/files/neg/t5067.check
index 32491766d7..395eda7442 100644
--- a/test/files/neg/t5067.check
+++ b/test/files/neg/t5067.check
@@ -1,6 +1,6 @@
t5067.scala:3: error: type mismatch;
- found : ((Int, Int)) => Int
- required: (Int, Int) => Int
- override def tupled: (Int, Int) => Int = super.tupled
- ^
+ found : ((Int, Int, Int)) => Int
+ required: (Int, Int, Int) => Int
+ override def tupled: (Int, Int, Int) => Int = super.tupled
+ ^
one error found
diff --git a/test/files/neg/t5067.scala b/test/files/neg/t5067.scala
index f8235c0e83..0a961d2f40 100644
--- a/test/files/neg/t5067.scala
+++ b/test/files/neg/t5067.scala
@@ -1,4 +1,4 @@
-class Foo extends Function2[Int, Int, Int] {
- def apply(x: Int, y: Int) = x + y
- override def tupled: (Int, Int) => Int = super.tupled
+class Foo extends Function3[Int, Int, Int, Int] {
+ def apply(x: Int, y: Int, z: Int) = x + y + z
+ override def tupled: (Int, Int, Int) => Int = super.tupled
}
diff --git a/test/files/run/tuple-zipped.scala b/test/files/run/tuple-zipped.scala
index a9851346bc..08dcc82de6 100644
--- a/test/files/run/tuple-zipped.scala
+++ b/test/files/run/tuple-zipped.scala
@@ -15,7 +15,7 @@ object Test {
def main(args: Array[String]): Unit = {
for (cc1 <- xss1 ; cc2 <- xss2) {
- val sum1 = (cc1, cc2).zip map { case (x, y) => x + y } sum
+ val sum1 = (cc1 zip cc2) map { case (x, y) => x + y } sum
val sum2 = (cc1, cc2).zipped map (_ + _) sum
assert(sum1 == sum2)