summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-08-15 18:23:54 +0000
committerMartin Odersky <odersky@gmail.com>2008-08-15 18:23:54 +0000
commit7261acdba484a39f6851d76c85590c352d536fb2 (patch)
treefa0bcef296bc040ca4751ae03dbd2a5df18ec0e3 /src/library
parent20a3e4ee457e61d3f695b794260b5a1e1e0156e9 (diff)
downloadscala-7261acdba484a39f6851d76c85590c352d536fb2.tar.gz
scala-7261acdba484a39f6851d76c85590c352d536fb2.tar.bz2
scala-7261acdba484a39f6851d76c85590c352d536fb2.zip
Backed out from addition of vararg += in Buffer.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/List.scala10
-rw-r--r--src/library/scala/collection/mutable/Buffer.scala8
-rw-r--r--src/library/scala/testing/SUnit.scala2
3 files changed, 12 insertions, 8 deletions
diff --git a/src/library/scala/List.scala b/src/library/scala/List.scala
index 287d552e34..dead80cdad 100644
--- a/src/library/scala/List.scala
+++ b/src/library/scala/List.scala
@@ -1158,7 +1158,7 @@ sealed abstract class List[+A] extends Seq[A] with Product {
var these = this
var those = that
while (!these.isEmpty && !those.isEmpty) {
- b += (these.head, those.head)
+ b += ((these.head, those.head))
these = these.tail
those = those.tail
}
@@ -1177,7 +1177,7 @@ sealed abstract class List[+A] extends Seq[A] with Product {
var idx = 0
while(!these.isEmpty) {
- b += (these.head, idx)
+ b += ((these.head, idx))
these = these.tail
idx += 1
}
@@ -1209,16 +1209,16 @@ sealed abstract class List[+A] extends Seq[A] with Product {
var these = this
var those = that
while (!these.isEmpty && !those.isEmpty) {
- b += (these.head, those.head)
+ b += ((these.head, those.head))
these = these.tail
those = those.tail
}
while (!these.isEmpty) {
- b += (these.head, thatElem)
+ b += ((these.head, thatElem))
these = these.tail
}
while (!those.isEmpty) {
- b += (thisElem, those.head)
+ b += ((thisElem, those.head))
those = those.tail
}
b.toList
diff --git a/src/library/scala/collection/mutable/Buffer.scala b/src/library/scala/collection/mutable/Buffer.scala
index cbe594bca1..9c00c140e0 100644
--- a/src/library/scala/collection/mutable/Buffer.scala
+++ b/src/library/scala/collection/mutable/Buffer.scala
@@ -37,15 +37,17 @@ trait Buffer[A] extends AnyRef
/** Append a two or more elements to this buffer.
*
+ * enable this for 2.8.0!
+ *
* @param elem1 the first element to append.
* @param elem2 the second element to append.
* @param elems the remaining elements to append.
- */
def +=(elem1: A, elem2: A, elems: A*): Unit = {
this += elem1
this += elem2
this ++= elems
}
+ */
/** Append a single element to this buffer and return
* the identity of the buffer.
@@ -57,12 +59,14 @@ trait Buffer[A] extends AnyRef
/** Append two or more elements to this buffer and return
* the identity of the buffer.
*
+ * enable this for 2.8.0!
+ *
* @param elem1 the first element to append.
* @param elem2 the second element to append.
* @param elems the remaining elements to append.
- */
def +(elem1: A, elem2: A, elems: A*): Buffer[A] =
this + elem1 + elem2 ++ elems
+ */
/** Prepend a single element to this buffer and return
* the identity of the buffer.
diff --git a/src/library/scala/testing/SUnit.scala b/src/library/scala/testing/SUnit.scala
index 1a87c64b0e..7f4954e7e3 100644
--- a/src/library/scala/testing/SUnit.scala
+++ b/src/library/scala/testing/SUnit.scala
@@ -116,7 +116,7 @@ object SUnit {
val buf = new ArrayBuffer[(Test, Throwable)]()
def addFailure(test: Test, t: Throwable) {
- buf += (test, t)
+ buf += ((test, t))
}
def failureCount() =