summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/ast/Trees.scala6
-rw-r--r--src/compiler/scala/tools/nsc/matching/ParallelMatching.scala33
-rw-r--r--src/library/scala/Array.scala42
-rw-r--r--src/library/scala/Either.scala32
-rw-r--r--src/library/scala/Product.scala3
-rw-r--r--src/library/scala/collection/IterableLike.scala5
-rw-r--r--src/library/scala/collection/Iterator.scala8
-rw-r--r--src/library/scala/collection/SeqLike.scala7
-rw-r--r--src/library/scala/collection/SeqProxyLike.scala1
-rw-r--r--src/library/scala/collection/SetLike.scala8
-rw-r--r--src/library/scala/collection/immutable/List.scala62
-rw-r--r--src/library/scala/collection/immutable/Stack.scala1
-rw-r--r--src/library/scala/collection/immutable/TreeHashMap.scala2
-rw-r--r--src/library/scala/collection/interfaces/SeqMethods.scala1
-rw-r--r--src/library/scala/collection/mutable/BufferLike.scala3
-rw-r--r--src/library/scala/collection/mutable/OpenHashMap.scala3
-rw-r--r--src/library/scala/collection/mutable/Stack.scala1
-rw-r--r--src/library/scala/collection/mutable/StringBuilder.scala35
-rw-r--r--src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala4
-rw-r--r--test/files/jvm/stringbuilder.scala4
-rw-r--r--test/files/run/randomAccessSeq-apply.scala2
-rw-r--r--test/files/run/t1524.scala2
22 files changed, 24 insertions, 241 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/Trees.scala b/src/compiler/scala/tools/nsc/ast/Trees.scala
index e4dfb14833..435713d82c 100644
--- a/src/compiler/scala/tools/nsc/ast/Trees.scala
+++ b/src/compiler/scala/tools/nsc/ast/Trees.scala
@@ -630,7 +630,7 @@ trait Trees {
}})
val (edefs, rest) = body span treeInfo.isEarlyDef
val (evdefs, etdefs) = edefs partition treeInfo.isEarlyValDef
- val (lvdefs, gvdefs) = List.unzip {
+ val (lvdefs, gvdefs) =
evdefs map {
case vdef @ ValDef(mods, name, tpt, rhs) =>
val fld = treeCopy.ValDef(
@@ -639,8 +639,8 @@ trait Trees {
EmptyTree)
val local = treeCopy.ValDef(vdef, Modifiers(PRESUPER), name, tpt, rhs)
(local, fld)
- }
- }
+ } unzip
+
val constrs = {
if (constrMods.isTrait) {
if (body forall treeInfo.isInterfaceMember) List()
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
index d87eb29cf1..710311a627 100644
--- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
+++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
@@ -454,17 +454,17 @@ trait ParallelMatching extends ast.TreeDSL
private lazy val rowsplit = {
require(scrut.tpe <:< head.tpe)
- List.unzip(
- for ((c, rows) <- pmatch pzip rest.rows) yield {
- def canSkip = pivot canSkipSubsequences c
- def passthrough(skip: Boolean) = if (skip) None else Some(rows insert c)
-
- pivot.subsequences(c, scrut.seqType) match {
- case Some(ps) => (Some(rows insert ps), passthrough(canSkip))
- case None => (None, passthrough(false))
- }
+ val res = for ((c, rows) <- pmatch pzip rest.rows) yield {
+ def canSkip = pivot canSkipSubsequences c
+ def passthrough(skip: Boolean) = if (skip) None else Some(rows insert c)
+
+ pivot.subsequences(c, scrut.seqType) match {
+ case Some(ps) => (Some(rows insert ps), passthrough(canSkip))
+ case None => (None, passthrough(false))
}
- ) match { case (l1, l2) => (l1.flatten, l2.flatten) }
+ }
+
+ res.unzip match { case (l1, l2) => (l1.flatten, l2.flatten) }
}
lazy val cond = (pivot precondition pmatch).get // length check
@@ -511,8 +511,8 @@ trait ParallelMatching extends ast.TreeDSL
case class Yes(bx: Int, moreSpecific: Pattern, subsumed: List[Pattern])
case class No(bx: Int, remaining: Pattern)
- val (yeses, noes) : (List[Yes], List[No]) = List.unzip(
- for ((pattern, j) <- pmatch.pzip()) yield {
+ val (yeses, noes) : (List[Yes], List[No]) =
+ (for ((pattern, j) <- pmatch.pzip()) yield {
// scrutinee, head of pattern group
val (s, p) = (pattern.tpe, head.necessaryType)
@@ -539,8 +539,7 @@ trait ParallelMatching extends ast.TreeDSL
case x if x.isDefault || pMatchesS => (passl(), passr)
case _ => (None, passr)
}) : (Option[Yes], Option[No])
- }
- ) match { case (x,y) => (x.flatten, y.flatten) }
+ }).unzip match { case (x,y) => (x.flatten, y.flatten) }
val moreSpecific = yeses map (_.moreSpecific)
val subsumed = yeses map (x => (x.bx, x.subsumed))
@@ -739,12 +738,10 @@ trait ParallelMatching extends ast.TreeDSL
/** Cut out the column containing the non-default pattern. */
class Cut(index: Int) {
/** The first two separate out the 'i'th pattern in each row from the remainder. */
- private val (_column, _rows) =
- List.unzip(rows map (_ extractColumn index))
+ private val (_column, _rows) = rows map (_ extractColumn index) unzip
/** Now the 'i'th tvar is separated out and used as a new Scrutinee. */
- private val (_pv, _tvars) =
- tvars extractIndex index
+ private val (_pv, _tvars) = tvars extractIndex index
/** The non-default pattern (others.head) replaces the column head. */
private val (_ncol, _nrep) =
diff --git a/src/library/scala/Array.scala b/src/library/scala/Array.scala
index a323dccffc..a9f07157a0 100644
--- a/src/library/scala/Array.scala
+++ b/src/library/scala/Array.scala
@@ -397,48 +397,6 @@ object Array extends FallbackArrayBuilding {
}
a
}
-
- /** Create an array containing the values of a given function <code>f</code>
- * over given range <code>[0..n)</code>
- */
- @deprecated("use `Array.tabulate' instead")
- def fromFunction[T: ClassManifest](f: Int => T)(n: Int): Array[T] = {
- val a = new Array[T](n)
- var i = 0
- while (i < n) {
- a(i) = f(i)
- i += 1
- }
- a
- }
-
- /** Create an array containing the values of a given function <code>f</code>
- * over given range <code>[0..n1, 0..n2)</code>
- */
- @deprecated("use `Array.tabulate' instead")
- def fromFunction[T: ClassManifest](f: (Int, Int) => T)(n1: Int, n2: Int): Array[Array[T]] =
- fromFunction(i => fromFunction(f(i, _))(n2))(n1)
-
- /** Create an array containing the values of a given function <code>f</code>
- * over given range <code>[0..n1, 0..n2, 0..n3)</code>
- */
- @deprecated("use `Array.tabulate' instead")
- def fromFunction[T: ClassManifest](f: (Int, Int, Int) => T)(n1: Int, n2: Int, n3: Int): Array[Array[Array[T]]] =
- fromFunction(i => fromFunction(f(i, _, _))(n2, n3))(n1)
-
- /** Create an array containing the values of a given function <code>f</code>
- * over given range <code>[0..n1, 0..n2, 0..n3, 0..n4)</code>
- */
- @deprecated("use `Array.tabulate' instead")
- def fromFunction[T: ClassManifest](f: (Int, Int, Int, Int) => T)(n1: Int, n2: Int, n3: Int, n4: Int): Array[Array[Array[Array[T]]]] =
- fromFunction(i => fromFunction(f(i, _, _, _))(n2, n3, n4))(n1)
-
- /** Create an array containing the values of a given function <code>f</code>
- * over given range <code>[0..n1, 0..n2, 0..n3, 0..n4, 0..n5)</code>
- */
- @deprecated("use `Array.tabulate' instead")
- def fromFunction[T: ClassManifest](f: (Int, Int, Int, Int, Int) => T)(n1: Int, n2: Int, n3: Int, n4: Int, n5: Int): Array[Array[Array[Array[Array[T]]]]] =
- fromFunction(i => fromFunction(f(i, _, _, _, _))(n2, n3, n4, n5))(n1)
}
/** This class represents polymorphic arrays. <code>Array[T]</code> is Scala's representation
diff --git a/src/library/scala/Either.scala b/src/library/scala/Either.scala
index cc84685287..e456dab2dd 100644
--- a/src/library/scala/Either.scala
+++ b/src/library/scala/Either.scala
@@ -328,38 +328,6 @@ object Either {
case Right(t) => t
}
- /**
- * Returns the <code>Left</code> values in the given <code>Iterable</code> of <code>Either</code>s.
- */
- @deprecated("use `for (Left(a) <- es) yield a'")
- def lefts[A, B](es: Iterable[Either[A, B]]) =
- es.foldRight[List[A]](Nil)((e, as) => e match {
- case Left(a) => a :: as
- case Right(_) => as
- })
-
- /**
- * Returns the <code>Right</code> values in the given<code>Iterable</code> of <code>Either</code>s.
- */
- @deprecated("use `for (Right(a) <- es) yield a'")
- def rights[A, B](es: Iterable[Either[A, B]]) =
- es.foldRight[List[B]](Nil)((e, bs) => e match {
- case Left(_) => bs
- case Right(b) => b :: bs
- })
-
- /** Transforms an Iterable of Eithers into a pair of lists.
- *
- * @param xs the iterable of Eithers to separate
- * @return a pair of lists.
- */
- @deprecated("use `for ((Left(l), Right(r)) <- es partition isLeft) yield (l, r)'")
- def separate[A,B](es: Iterable[Either[A,B]]): (List[A], List[B]) =
- es.foldRight[(List[A], List[B])]((Nil, Nil)) {
- case (Left(a), (lefts, rights)) => (a :: lefts, rights)
- case (Right(b), (lefts, rights)) => (lefts, b :: rights)
- }
-
/** If the condition satisfies, return the given A in <code>Left</code>,
* otherwise, return the given B in <code>Right</code>.
*/
diff --git a/src/library/scala/Product.scala b/src/library/scala/Product.scala
index ce8f733771..a9ced34768 100644
--- a/src/library/scala/Product.scala
+++ b/src/library/scala/Product.scala
@@ -41,9 +41,6 @@ trait Product extends Equals {
def next() = { val result = productElement(c); c += 1; result }
}
- @deprecated("use productIterator instead")
- def productElements: Iterator[Any] = productIterator
-
/**
* By default the empty string. Implementations may override this
* method in order to prepend a string prefix to the result of the
diff --git a/src/library/scala/collection/IterableLike.scala b/src/library/scala/collection/IterableLike.scala
index 2946426748..1a17c9b7b0 100644
--- a/src/library/scala/collection/IterableLike.scala
+++ b/src/library/scala/collection/IterableLike.scala
@@ -360,11 +360,6 @@ self =>
*/
override def view(from: Int, until: Int) = view.slice(from, until)
- @deprecated("use `head' instead") def first: A = head
-
- /** <code>None</code> if iterable is empty. */
- @deprecated("use `headOption' instead") def firstOption: Option[A] = headOption
-
/**
* returns a projection that can be used to call non-strict <code>filter</code>,
* <code>map</code>, and <code>flatMap</code> methods that build projections
diff --git a/src/library/scala/collection/Iterator.scala b/src/library/scala/collection/Iterator.scala
index ea186c7a7e..20573ca3ab 100644
--- a/src/library/scala/collection/Iterator.scala
+++ b/src/library/scala/collection/Iterator.scala
@@ -48,14 +48,6 @@ object Iterator {
*/
def apply[A](elems: A*): Iterator[A] = elems.iterator
- /** Concatenates the given argument iterators into a single iterator.
- *
- * @param its the argument iterators that are to be concatenated
- * @return the concatenation of all the argument iterators
- */
- @deprecated("use <code>++</code>")
- def concat[A](xss: Iterator[A]*): Iterator[A] = xss.iterator.flatten
-
/** An iterator that returns the results of some element computation a number of times.
* @param len The number of elements returned
* @param elem The element computation determinining each result
diff --git a/src/library/scala/collection/SeqLike.scala b/src/library/scala/collection/SeqLike.scala
index 661f7b7a04..65b4bb016c 100644
--- a/src/library/scala/collection/SeqLike.scala
+++ b/src/library/scala/collection/SeqLike.scala
@@ -293,9 +293,6 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self =>
*/
def reverseIterator: Iterator[A] = toCollection(reverse).iterator
- @deprecated("use `reverseIterator' instead")
- def reversedElements = reverseIterator
-
/**
* Checks whether the argument sequence is contained at the
* specified index within the receiver object.
@@ -613,10 +610,6 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self =>
*/
override def toString = super[IterableLike].toString
- /** Returns index of the last element satisying a predicate, or -1. */
- @deprecated("use `lastIndexWhere' instead")
- def findLastIndexOf(p: A => Boolean): Int = lastIndexWhere(p)
-
@deprecated("Should be replaced by <code>(s1, s2) forall { case (x, y) => f(x, y) }</code>")
def equalsWith[B](that: Seq[B])(f: (A,B) => Boolean): Boolean = {
val i = this.iterator
diff --git a/src/library/scala/collection/SeqProxyLike.scala b/src/library/scala/collection/SeqProxyLike.scala
index 1ca3bfa155..06bae39aef 100644
--- a/src/library/scala/collection/SeqProxyLike.scala
+++ b/src/library/scala/collection/SeqProxyLike.scala
@@ -56,7 +56,6 @@ trait SeqProxyLike[+A, +This <: SeqLike[A, This] with Seq[A]] extends SeqLike[A,
override def indices: Range = self.indices
override def view = self.view
override def view(from: Int, until: Int) = self.view(from, until)
- override def findLastIndexOf(p: A => Boolean): Int = self.lastIndexWhere(p)
override def equalsWith[B](that: Seq[B])(f: (A,B) => Boolean): Boolean = (self zip that) forall { case (x,y) => f(x,y) }
override def containsSlice[B](that: Seq[B]): Boolean = self.indexOfSeq(that) != -1
}
diff --git a/src/library/scala/collection/SetLike.scala b/src/library/scala/collection/SetLike.scala
index 0752f4185f..0b123b0c90 100644
--- a/src/library/scala/collection/SetLike.scala
+++ b/src/library/scala/collection/SetLike.scala
@@ -105,14 +105,6 @@ self =>
*/
def &(that: Set[A]): This = intersect(that)
- /** This method is an alias for <code>intersect</code>.
- * It computes an intersection with set <code>that</code>.
- * It removes all the elements that are not present in <code>that</code>.
- *
- * @param that the set to intersect with
- */
- @deprecated("use & instead") def ** (that: Set[A]): This = intersect(that)
-
/** The union of this set and the given set <code>that</code>.
*
* @param that the set of elements to add
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala
index f1546f1f0f..d60ea0f58b 100644
--- a/src/library/scala/collection/immutable/List.scala
+++ b/src/library/scala/collection/immutable/List.scala
@@ -555,68 +555,6 @@ object List extends SeqFactory[List] {
b.toList
}
- /** Transforms a list of pairs into a pair of lists.
- *
- * @param xs the list of pairs to unzip
- * @return a pair of lists.
- */
- @deprecated("use `xs.unzip' instead")
- def unzip[A,B](xs: List[(A,B)]): (List[A], List[B]) = {
- val b1 = new ListBuffer[A]
- val b2 = new ListBuffer[B]
- var xc = xs
- while (!xc.isEmpty) {
- b1 += xc.head._1
- b2 += xc.head._2
- xc = xc.tail
- }
- (b1.toList, b2.toList)
- }
-
- /** Transforms an iterable of pairs into a pair of lists.
- *
- * @param xs the iterable of pairs to unzip
- * @return a pair of lists.
- */
- @deprecated("use `xs.unzip' instead")
- def unzip[A,B](xs: Iterable[(A,B)]): (List[A], List[B]) =
- xs.foldRight[(List[A], List[B])]((Nil, Nil)) {
- case ((x, y), (xs, ys)) => (x :: xs, y :: ys)
- }
-
- /**
- * Returns the <code>Left</code> values in the given <code>Iterable</code>
- * of <code>Either</code>s.
- */
- @deprecated("use `Either.lefts' instead")
- def lefts[A, B](es: Iterable[Either[A, B]]) =
- es.foldRight[List[A]](Nil)((e, as) => e match {
- case Left(a) => a :: as
- case Right(_) => as
- })
-
- /**
- * Returns the <code>Right</code> values in the given<code>Iterable</code> of <code>Either</code>s.
- */
- @deprecated("use `Either.rights' instead")
- def rights[A, B](es: Iterable[Either[A, B]]) =
- es.foldRight[List[B]](Nil)((e, bs) => e match {
- case Left(_) => bs
- case Right(b) => b :: bs
- })
-
- /** Transforms an Iterable of Eithers into a pair of lists.
- *
- * @param xs the iterable of Eithers to separate
- * @return a pair of lists.
- */
- @deprecated("use `Either.separate' instead")
- def separate[A,B](es: Iterable[Either[A,B]]): (List[A], List[B]) =
- es.foldRight[(List[A], List[B])]((Nil, Nil)) {
- case (Left(a), (lefts, rights)) => (a :: lefts, rights)
- case (Right(b), (lefts, rights)) => (lefts, b :: rights)
- }
-
/** Converts an iterator to a list.
*
* @param it the iterator to convert
diff --git a/src/library/scala/collection/immutable/Stack.scala b/src/library/scala/collection/immutable/Stack.scala
index 2813bc6656..288b1707cb 100644
--- a/src/library/scala/collection/immutable/Stack.scala
+++ b/src/library/scala/collection/immutable/Stack.scala
@@ -69,7 +69,6 @@ class Stack[+A] protected (protected val elems: List[A]) extends Seq[A] {
*
* @param elems the iterator object.
* @return the stack with the new elements on top.
- * @deprecated
*/
def pushAll[B >: A](elems: Iterator[B]): Stack[B] =
((this: Stack[B]) /: elems)(_ push _)
diff --git a/src/library/scala/collection/immutable/TreeHashMap.scala b/src/library/scala/collection/immutable/TreeHashMap.scala
index d991df196f..6b4f728925 100644
--- a/src/library/scala/collection/immutable/TreeHashMap.scala
+++ b/src/library/scala/collection/immutable/TreeHashMap.scala
@@ -177,8 +177,6 @@ private[collection] sealed abstract class AssocMap[Key, +Value] extends immutabl
def iterator : Iterator[(Key, Value)] = new AssocMapIterator(this)
- @deprecated("use `iterator' instead") def elements = iterator
-
override final def foreach[U](f : ((Key, Value)) => U) = this match {
case Cons(key, value, tail) => { f((key, value)); tail.foreach(f); }
case Nil() => {}
diff --git a/src/library/scala/collection/interfaces/SeqMethods.scala b/src/library/scala/collection/interfaces/SeqMethods.scala
index 8256c5304c..c7c138c2c3 100644
--- a/src/library/scala/collection/interfaces/SeqMethods.scala
+++ b/src/library/scala/collection/interfaces/SeqMethods.scala
@@ -48,7 +48,6 @@ trait SeqMethods[+A, +This <: SeqLike[A, This] with Seq[A]] extends IterableMeth
def reverse: This
def reverseIterator: Iterator[A]
def segmentLength(p: A => Boolean, from: Int): Int
- def slice(from: Int): Seq[A]
def startsWith[B](that: Seq[B]): Boolean
def startsWith[B](that: Seq[B], offset: Int): Boolean
def union[B >: A, That](that: Seq[B])(implicit bf: CanBuildFrom[This, B, That]): That
diff --git a/src/library/scala/collection/mutable/BufferLike.scala b/src/library/scala/collection/mutable/BufferLike.scala
index 3a92f4f7da..20c2d67658 100644
--- a/src/library/scala/collection/mutable/BufferLike.scala
+++ b/src/library/scala/collection/mutable/BufferLike.scala
@@ -139,9 +139,6 @@ trait BufferLike[A, +This <: BufferLike[A, This] with Buffer[A]]
*/
def ++=:(iter: Iterator[A]): This = { insertAll(0, iter.toSeq); this }
- @deprecated("use ++=: instead")
- final def ++:(iter: Iterator[A]): This = ++=:(iter)
-
/** Appends elements to this buffer.
*
* @param elems the elements to append.
diff --git a/src/library/scala/collection/mutable/OpenHashMap.scala b/src/library/scala/collection/mutable/OpenHashMap.scala
index 044ae59fd8..5582d48355 100644
--- a/src/library/scala/collection/mutable/OpenHashMap.scala
+++ b/src/library/scala/collection/mutable/OpenHashMap.scala
@@ -189,9 +189,6 @@ class OpenHashMap[Key, Value](initialSize : Int) extends scala.collection.mutabl
}
}
- @deprecated("use `iterator' instead")
- override def elements: Iterator[(Key, Value)] = iterator
-
override def clone : OpenHashMap[Key, Value] = {
val it = new OpenHashMap[Key, Value]
foreachUndeletedEntry(entry => it.put(entry.key, entry.hash, entry.value.get));
diff --git a/src/library/scala/collection/mutable/Stack.scala b/src/library/scala/collection/mutable/Stack.scala
index 6e7205c3fa..5725580139 100644
--- a/src/library/scala/collection/mutable/Stack.scala
+++ b/src/library/scala/collection/mutable/Stack.scala
@@ -62,7 +62,6 @@ class Stack[A] private (var elems: List[A]) extends scala.collection.Seq[A] with
*
* @param elems the iterator object.
* @return the stack with the new elements on top.
- * @deprecated
*/
def pushAll(elems: Iterator[A]): this.type = { for (elem <- elems) { push(elem); () }; this }
diff --git a/src/library/scala/collection/mutable/StringBuilder.scala b/src/library/scala/collection/mutable/StringBuilder.scala
index 47bac8ad47..b216e24c5d 100644
--- a/src/library/scala/collection/mutable/StringBuilder.scala
+++ b/src/library/scala/collection/mutable/StringBuilder.scala
@@ -92,11 +92,6 @@ final class StringBuilder(initCapacity: Int, private val initValue: String)
*/
def capacity: Int = array.length
- /** Same as <code>ensureCapacity</code>. */
- @deprecated("use `ensureCapacity' instead. An assignment is misleading because\n"+
- "it can never decrease the capacity.")
- def capacity_=(n: Int) { ensureCapacity(n) }
-
/** <p>
* Ensures that the capacity is at least equal to the specified minimum.
* If the current capacity is less than the argument, then a new internal
@@ -297,11 +292,6 @@ final class StringBuilder(initCapacity: Int, private val initValue: String)
def appendAll(x: Seq[Char]): StringBuilder =
appendAll(x.toArray, 0, x.length)
- @deprecated("use appendAll instead. This method is deprecated because of the\n"+
- "possible confusion with `append(Any)'.")
- def append(x: Seq[Char]): StringBuilder =
- appendAll(x)
-
/** <p>
* Appends the string representation of the <code>Char</code> array
* argument to this sequence.
@@ -318,11 +308,6 @@ final class StringBuilder(initCapacity: Int, private val initValue: String)
def appendAll(x: Array[Char]): StringBuilder =
appendAll(x, 0, x.length)
- @deprecated("use appendAll instead. This method is deprecated because\n"+
- "of the possible confusion with `append(Any)'.")
- def append(x: Array[Char]): StringBuilder =
- appendAll(x)
-
/** <p>
* Appends the string representation of a subarray of the
* <code>char</code> array argument to this sequence.
@@ -346,11 +331,6 @@ final class StringBuilder(initCapacity: Int, private val initValue: String)
this
}
- @deprecated("use appendAll instead. This method is deprecated because\n"+
- "of the possible confusion with `append(Any, Int, Int)'.")
- def append(x: Array[Char], offset: Int, len: Int): StringBuilder =
- appendAll(x, offset, len)
-
/** <p>
* Appends the string representation of the <code>Boolean</code>
* argument to the sequence.
@@ -478,11 +458,6 @@ final class StringBuilder(initCapacity: Int, private val initValue: String)
this
}
- @deprecated("use insertAll instead. This method is deprecated because of the\n"+
- "possible confusion with `insert(Int, Any, Int, Int)'.")
- def insert(index: Int, str: Array[Char], offset: Int, len: Int): StringBuilder =
- insertAll(index, str, offset, len)
-
/** <p>
* Inserts the string representation of the <code>Any</code>
* argument into this character sequence.
@@ -537,11 +512,6 @@ final class StringBuilder(initCapacity: Int, private val initValue: String)
def insertAll(at: Int, x: Seq[Char]): StringBuilder =
insertAll(at, x.toArray)
- @deprecated("use insertAll instead. This method is deprecated because of\n"+
- "the possible confusion with `insert(Int, Any)'.")
- def insert(at: Int, x: Seq[Char]): StringBuilder =
- insertAll(at, x)
-
/** Inserts the string representation of the <code>Char</code> array
* argument into this sequence.
*
@@ -561,11 +531,6 @@ final class StringBuilder(initCapacity: Int, private val initValue: String)
this
}
- @deprecated("use insertAll instead. This method is deprecated because of\n"+
- "the possible confusion with `insert(Int, Any)'.")
- def insert(at: Int, x: Array[Char]): StringBuilder =
- insertAll(at, x)
-
/** <p>
* Inserts the string representation of the <code>Boolean</code> argument
* into this sequence.
diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala
index abff45fca5..906b44e4ae 100644
--- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala
+++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala
@@ -308,10 +308,10 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) {
})
case TypeRefType(prefix, symbol, typeArgs) => sep + (symbol.path match {
case "scala.<repeated>" => flags match {
- case TypeFlags(true) => toString(typeArgs.first) + "*"
+ case TypeFlags(true) => toString(typeArgs.head) + "*"
case _ => "scala.Seq" + typeArgString(typeArgs)
}
- case "scala.<byname>" => "=> " + toString(typeArgs.first)
+ case "scala.<byname>" => "=> " + toString(typeArgs.head)
case _ => {
val path = StringUtil.cutSubstring(symbol.path)(".package") //remove package object reference
StringUtil.trimStart(processName(path) + typeArgString(typeArgs), "<empty>.")
diff --git a/test/files/jvm/stringbuilder.scala b/test/files/jvm/stringbuilder.scala
index bacd13c715..c86a8a7713 100644
--- a/test/files/jvm/stringbuilder.scala
+++ b/test/files/jvm/stringbuilder.scala
@@ -53,7 +53,7 @@ object Test2 extends TestCase("append") with Assert {
val j1 = new java.lang.StringBuilder // Java 1.5+
val s1 = new StringBuilder
j1 append "###" append Array('0', '1', '2') append "xyz".subSequence(0, 3)
- s1 append "###" append Array('0', '1', '2') append List('x', 'y', 'z')
+ s1 append "###" appendAll Array('0', '1', '2') appendAll List('x', 'y', 'z')
assertEquals("s1.toString equals j1.toString", true, s1.toString equals j1.toString)
}
}
@@ -72,7 +72,7 @@ object Test3 extends TestCase("insert") with Assert {
val j1 = new java.lang.StringBuilder // Java 1.5+
val s1 = new StringBuilder
j1 insert (0, "###") insert (0, Array('0', '1', '2')) insert (0, "xyz".subSequence(0, 3))
- s1 insert (0, "###") insert (0, Array('0', '1', '2')) insert (0, List('x', 'y', 'z'))
+ s1 insert (0, "###") insertAll (0, Array('0', '1', '2')) insertAll (0, List('x', 'y', 'z'))
//println("j1="+j1+", s1="+s1)//debug
assertEquals("s1.toString equals j1.toString", true, s1.toString equals j1.toString)
diff --git a/test/files/run/randomAccessSeq-apply.scala b/test/files/run/randomAccessSeq-apply.scala
index 863a4d42a2..1f74050bb7 100644
--- a/test/files/run/randomAccessSeq-apply.scala
+++ b/test/files/run/randomAccessSeq-apply.scala
@@ -6,7 +6,7 @@ object Test extends Application {
assert(List(1) == single.toList)
val two = RandomAccessSeq("a", "b")
- assert("a" == two.first)
+ assert("a" == two.head)
assert("b" == two.apply(1))
println("OK")
diff --git a/test/files/run/t1524.scala b/test/files/run/t1524.scala
index ecd90adec7..4f6c65d052 100644
--- a/test/files/run/t1524.scala
+++ b/test/files/run/t1524.scala
@@ -3,5 +3,5 @@ object Test extends Application {
val buf = new scala.collection.mutable.ArrayBuffer[String] { override val initialSize = 0 }
buf += "initial"
buf += "second"
- println(buf.first)
+ println(buf.head)
}