Permalink
Browse files

SI-7469 Remove misc. @deprecated elements

  • Loading branch information...
1 parent ada8d91 commit 765ac94c2ba8daba265bbccfe1b44712d240922e @soc soc committed Dec 20, 2013
@@ -95,8 +95,6 @@ object Predef extends LowPriorityImplicits with DeprecatedPredef {
type Set[A] = immutable.Set[A]
val Map = immutable.Map
val Set = immutable.Set
- // @deprecated("Use scala.AnyRef instead", "2.10.0")
- // def AnyRef = scala.AnyRef
// Manifest types, companions, and incantations for summoning
@annotation.implicitNotFound(msg = "No ClassManifest available for ${T}.")
@@ -11,10 +11,10 @@ package collection
package mutable
/**
- * An immutable AVL Tree implementation used by mutable.TreeSet
+ * An immutable AVL Tree implementation formerly used by mutable.TreeSet
*
* @author Lucien Pereira
- * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11")
+ * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11.0")
*/
private[mutable] sealed trait AVLTree[+A] extends Serializable {
def balance: Int
@@ -65,7 +65,7 @@ private[mutable] sealed trait AVLTree[+A] extends Serializable {
}
/**
- * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11")
+ * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11.0")
*/
private case object Leaf extends AVLTree[Nothing] {
override val balance: Int = 0
@@ -74,7 +74,7 @@ private case object Leaf extends AVLTree[Nothing] {
}
/**
- * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11")
+ * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11.0")
*/
private case class Node[A](data: A, left: AVLTree[A], right: AVLTree[A]) extends AVLTree[A] {
override val balance: Int = right.depth - left.depth
@@ -211,7 +211,7 @@ private case class Node[A](data: A, left: AVLTree[A], right: AVLTree[A]) extends
}
/**
- * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11")
+ * @deprecated("AVLTree and its related classes are being removed from the standard library since they're not different enough from RedBlackTree to justify keeping them.", "2.11.0")
*/
private class AVLIterator[A](root: Node[A]) extends Iterator[A] {
val stack = mutable.ArrayStack[Node[A]](root)
@@ -34,7 +34,7 @@ package io
* @author Burak Emir (translated from work by Matthias Zenger and others)
*/
@deprecated("This class will be removed.", "2.10.0")
-abstract class Position {
+private[scala] abstract class Position {
/** Definable behavior for overflow conditions.
*/
def checkInput(line: Int, column: Int): Unit
@@ -68,7 +68,7 @@ abstract class Position {
def toString(pos: Int): String = line(pos) + ":" + column(pos)
}
-object Position extends Position {
+private[scala] object Position extends Position {
def checkInput(line: Int, column: Int) {
if (line < 0)
throw new IllegalArgumentException(line + " < 0")
@@ -61,21 +61,6 @@ package object reflect {
// using the mechanism implemented in `scala.tools.reflect.FastTrack`
// todo. once we have implicit macros for tag generation, we can remove this anchor
private[scala] def materializeClassTag[T](): ClassTag[T] = macro ???
-
- @deprecated("Use `@scala.beans.BeanDescription` instead", "2.10.0")
- type BeanDescription = scala.beans.BeanDescription
- @deprecated("Use `@scala.beans.BeanDisplayName` instead", "2.10.0")
- type BeanDisplayName = scala.beans.BeanDisplayName
- @deprecated("Use `@scala.beans.BeanInfo` instead", "2.10.0")
- type BeanInfo = scala.beans.BeanInfo
- @deprecated("Use `@scala.beans.BeanInfoSkip` instead", "2.10.0")
- type BeanInfoSkip = scala.beans.BeanInfoSkip
- @deprecated("Use `@scala.beans.BeanProperty` instead", "2.10.0")
- type BeanProperty = scala.beans.BeanProperty
- @deprecated("Use `@scala.beans.BooleanBeanProperty` instead", "2.10.0")
- type BooleanBeanProperty = scala.beans.BooleanBeanProperty
- @deprecated("Use `@scala.beans.ScalaBeanInfo` instead", "2.10.0")
- type ScalaBeanInfo = scala.beans.ScalaBeanInfo
}
/** An exception that indicates an error during Scala reflection */
@@ -478,15 +478,15 @@ class Flags extends ModifierFlags {
)
@deprecated("Use flagString on the flag-carrying member", "2.10.0")
- def flagsToString(flags: Long, privateWithin: String): String = {
+ private[scala] def flagsToString(flags: Long, privateWithin: String): String = {
val access = accessString(flags, privateWithin)
val nonAccess = flagsToString(flags & ~AccessFlags)
List(nonAccess, access) filterNot (_ == "") mkString " "
}
@deprecated("Use flagString on the flag-carrying member", "2.10.0")
- def flagsToString(flags: Long): String = {
+ private[scala] def flagsToString(flags: Long): String = {
// Fast path for common case
if (flags == 0L) "" else {
var sb: StringBuilder = null
@@ -387,7 +387,7 @@ trait Scopes extends api.Scopes { self: SymbolTable =>
if (toList forall p) this
else newScopeWith(toList filter p: _*)
)
- @deprecated("Use `toList.reverse` instead", "2.10.0")
+ @deprecated("Use `toList.reverse` instead", "2.10.0") // Used in SBT 0.12.4
def reverse: List[Symbol] = toList.reverse
override def mkString(start: String, sep: String, end: String) =
@@ -65,9 +65,6 @@ abstract class SymbolTable extends macros.Universe
def isPastTyper = false
protected def isDeveloper: Boolean = settings.debug
- @deprecated("Give us a reason", "2.10.0")
- def abort(): Nothing = abort("unknown error")
-
@deprecated("Use devWarning if this is really a warning; otherwise use log", "2.11.0")
def debugwarn(msg: => String): Unit = devWarning(msg)
@@ -391,10 +388,9 @@ abstract class SymbolTable extends macros.Universe
*/
def isCompilerUniverse = false
- @deprecated("Use enteringPhase", "2.10.0")
+ @deprecated("Use enteringPhase", "2.10.0") // Used in SBT 0.12.4
@inline final def atPhase[T](ph: Phase)(op: => T): T = enteringPhase(ph)(op)
- @deprecated("Use enteringPhaseNotLaterThan", "2.10.0")
- @inline final def atPhaseNotLaterThan[T](target: Phase)(op: => T): T = enteringPhaseNotLaterThan(target)(op)
+
/**
* Adds the `sm` String interpolator to a [[scala.StringContext]].
@@ -895,7 +895,7 @@ trait Types
if (sym == btssym) return mid
else if (sym isLess btssym) hi = mid - 1
else if (btssym isLess sym) lo = mid + 1
- else abort()
+ else abort("sym is neither `sym == btssym`, `sym isLess btssym` nor `btssym isLess sym`")
}
-1
}
@@ -3601,7 +3601,7 @@ trait Types
}
def genPolyType(params: List[Symbol], tpe: Type): Type = GenPolyType(params, tpe)
- @deprecated("use genPolyType(...) instead", "2.10.0")
+ @deprecated("use genPolyType(...) instead", "2.10.0") // Used in reflection API
def polyType(params: List[Symbol], tpe: Type): Type = GenPolyType(params, tpe)
/** A creator for anonymous type functions, where the symbol for the type function still needs to be created.
@@ -239,8 +239,8 @@ private[util] trait InternalPositionImpl {
private[util] trait DeprecatedPosition {
self: Position =>
- @deprecated("use `point`", "2.9.0")
- def offset: Option[Int] = if (isDefined) Some(point) else None // used by sbt
+ @deprecated("use `point`", "2.9.0") // Used in SBT 0.12.4
+ def offset: Option[Int] = if (isDefined) Some(point) else None
@deprecated("use `focus`", "2.11.0")
def toSingleLine: Position = this
@@ -20,7 +20,7 @@ Macros_Test_2.scala:7: warning: macro defs must have explicitly specified return
^
Macros_Test_2.scala:14: error: exception during macro expansion:
scala.NotImplementedError: an implementation is missing
- at scala.Predef$.$qmark$qmark$qmark(Predef.scala:227)
+ at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
at Impls$.foo3(Impls_1.scala:7)
foo3
@@ -1,2 +1,2 @@
-import scala.reflect.{BeanProperty => bp}
+import scala.beans.{BeanProperty => bp}
class Foo { @bp var bar: Int = 1 }

0 comments on commit 765ac94

Please sign in to comment.