Skip to content

Commit

Permalink
SI-7469 Remove misc. @deprecated elements
Browse files Browse the repository at this point in the history
  • Loading branch information
soc committed Jan 8, 2014
1 parent ada8d91 commit 765ac94
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 39 deletions.
2 changes: 0 additions & 2 deletions src/library/scala/Predef.scala
Expand Up @@ -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}.")
Expand Down
10 changes: 5 additions & 5 deletions src/library/scala/collection/mutable/AVLTree.scala
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/library/scala/io/Position.scala
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
15 changes: 0 additions & 15 deletions src/library/scala/reflect/package.scala
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions src/reflect/scala/reflect/internal/Flags.scala
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/reflect/scala/reflect/internal/Scopes.scala
Expand Up @@ -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) =
Expand Down
8 changes: 2 additions & 6 deletions src/reflect/scala/reflect/internal/SymbolTable.scala
Expand Up @@ -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)

Expand Down Expand Up @@ -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]].
Expand Down
4 changes: 2 additions & 2 deletions src/reflect/scala/reflect/internal/Types.scala
Expand Up @@ -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
}
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/reflect/scala/reflect/internal/util/Position.scala
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/files/neg/macro-invalidret.check
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/files/neg/t3403.scala
@@ -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.