diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-01-15 14:11:51 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-01-15 14:11:51 -0800 |
commit | 8782954fa4cfe965d2323d575b09eca754d357e3 (patch) | |
tree | 65aff34aed79003b09f706139c0189a6dc1a27bd /src | |
parent | 0f784a53bcce67c760c8c1041d0f4c632fc3e5b3 (diff) | |
parent | 765ac94c2ba8daba265bbccfe1b44712d240922e (diff) | |
download | scala-8782954fa4cfe965d2323d575b09eca754d357e3.tar.gz scala-8782954fa4cfe965d2323d575b09eca754d357e3.tar.bz2 scala-8782954fa4cfe965d2323d575b09eca754d357e3.zip |
Merge pull request #3293 from soc/SI-7469
Remove misc. @deprecated elements
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/Predef.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/mutable/AVLTree.scala | 10 | ||||
-rw-r--r-- | src/library/scala/io/Position.scala | 4 | ||||
-rw-r--r-- | src/library/scala/reflect/package.scala | 15 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Flags.scala | 4 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Scopes.scala | 2 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/SymbolTable.scala | 8 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Types.scala | 4 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/util/Position.scala | 4 |
9 files changed, 16 insertions, 37 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 8900450fa3..ec587c158d 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -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}.") diff --git a/src/library/scala/collection/mutable/AVLTree.scala b/src/library/scala/collection/mutable/AVLTree.scala index d2205f9994..de09bb2040 100644 --- a/src/library/scala/collection/mutable/AVLTree.scala +++ b/src/library/scala/collection/mutable/AVLTree.scala @@ -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) diff --git a/src/library/scala/io/Position.scala b/src/library/scala/io/Position.scala index 85149223ee..011d0f17af 100644 --- a/src/library/scala/io/Position.scala +++ b/src/library/scala/io/Position.scala @@ -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") diff --git a/src/library/scala/reflect/package.scala b/src/library/scala/reflect/package.scala index 74c1f2172c..509d181d87 100644 --- a/src/library/scala/reflect/package.scala +++ b/src/library/scala/reflect/package.scala @@ -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 */ diff --git a/src/reflect/scala/reflect/internal/Flags.scala b/src/reflect/scala/reflect/internal/Flags.scala index 11c1d66190..e66ed9a3d4 100644 --- a/src/reflect/scala/reflect/internal/Flags.scala +++ b/src/reflect/scala/reflect/internal/Flags.scala @@ -479,7 +479,7 @@ 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) @@ -487,7 +487,7 @@ class Flags extends ModifierFlags { } @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 diff --git a/src/reflect/scala/reflect/internal/Scopes.scala b/src/reflect/scala/reflect/internal/Scopes.scala index b7a1681838..cf3f356daa 100644 --- a/src/reflect/scala/reflect/internal/Scopes.scala +++ b/src/reflect/scala/reflect/internal/Scopes.scala @@ -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) = diff --git a/src/reflect/scala/reflect/internal/SymbolTable.scala b/src/reflect/scala/reflect/internal/SymbolTable.scala index bed8310767..571c4cfa5d 100644 --- a/src/reflect/scala/reflect/internal/SymbolTable.scala +++ b/src/reflect/scala/reflect/internal/SymbolTable.scala @@ -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) @@ -405,10 +402,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]]. diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index e9230aceee..d0c322ca6b 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -894,7 +894,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 } @@ -3609,7 +3609,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. diff --git a/src/reflect/scala/reflect/internal/util/Position.scala b/src/reflect/scala/reflect/internal/util/Position.scala index 4032ec1157..f3eedb88e7 100644 --- a/src/reflect/scala/reflect/internal/util/Position.scala +++ b/src/reflect/scala/reflect/internal/util/Position.scala @@ -258,8 +258,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 |