summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-04-30 07:44:42 -0700
committerPaul Phillips <paulp@improving.org>2012-04-30 09:40:41 -0700
commitcf18d879d3f43d5a0c15c5c0af72f88c25605a08 (patch)
tree2112180d54c913b387791899905fb3d8ede376d0 /test/files/run
parent94c63f5da548996535cad43142758c9405118828 (diff)
downloadscala-cf18d879d3f43d5a0c15c5c0af72f88c25605a08.tar.gz
scala-cf18d879d3f43d5a0c15c5c0af72f88c25605a08.tar.bz2
scala-cf18d879d3f43d5a0c15c5c0af72f88c25605a08.zip
Optimization of Predef implicits.
All those wildcards in a default-scoped implicit are expensive, they each lead to a typevar on every search. Restructured the Tuple2/Tuple3 Zipped classes, they're better this way anyway. This also gets all that Tuple[23] code out of genprod.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/tuple-zipped.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/tuple-zipped.scala b/test/files/run/tuple-zipped.scala
index a9851346bc..b197183844 100644
--- a/test/files/run/tuple-zipped.scala
+++ b/test/files/run/tuple-zipped.scala
@@ -15,14 +15,14 @@ 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, cc2).zipped map { case (x, y) => x + y } sum
val sum2 = (cc1, cc2).zipped map (_ + _) sum
assert(sum1 == sum2)
}
for (cc1 <- xss1 ; cc2 <- xss2 ; cc3 <- xss3) {
- val sum1 = (cc1, cc2, cc3).zip map { case (x, y, z) => x + y + z } sum
+ val sum1 = (cc1, cc2, cc3).zipped map { case (x, y, z) => x + y + z } sum
val sum2 = (cc1, cc2, cc3).zipped map (_ + _ + _) sum
assert(sum1 == sum2)