summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2013-12-20 09:31:03 +0100
committerSimon Ochsenreither <simon@ochsenreither.de>2014-01-09 00:33:37 +0100
commit765ac94c2ba8daba265bbccfe1b44712d240922e (patch)
tree8a3e58abed115b22fc941008f20a6377bb6b9281
parentada8d9156baad2d8a24c1a40e032eb4bc7154bac (diff)
downloadscala-765ac94c2ba8daba265bbccfe1b44712d240922e.tar.gz
scala-765ac94c2ba8daba265bbccfe1b44712d240922e.tar.bz2
scala-765ac94c2ba8daba265bbccfe1b44712d240922e.zip
SI-7469 Remove misc. @deprecated elements
-rw-r--r--src/library/scala/Predef.scala2
-rw-r--r--src/library/scala/collection/mutable/AVLTree.scala10
-rw-r--r--src/library/scala/io/Position.scala4
-rw-r--r--src/library/scala/reflect/package.scala15
-rw-r--r--src/reflect/scala/reflect/internal/Flags.scala4
-rw-r--r--src/reflect/scala/reflect/internal/Scopes.scala2
-rw-r--r--src/reflect/scala/reflect/internal/SymbolTable.scala8
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala4
-rw-r--r--src/reflect/scala/reflect/internal/util/Position.scala4
-rw-r--r--test/files/neg/macro-invalidret.check2
-rw-r--r--test/files/neg/t3403.scala2
11 files changed, 18 insertions, 39 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 dcdf6728ce..1fae49366b 100644
--- a/src/reflect/scala/reflect/internal/Flags.scala
+++ b/src/reflect/scala/reflect/internal/Flags.scala
@@ -478,7 +478,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)
@@ -486,7 +486,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 0ce5a0fbea..a688884b7f 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)
@@ -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]].
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index 99e6ae633f..b85f2d7a51 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -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.
diff --git a/src/reflect/scala/reflect/internal/util/Position.scala b/src/reflect/scala/reflect/internal/util/Position.scala
index 15cfda26b5..ccd5189177 100644
--- a/src/reflect/scala/reflect/internal/util/Position.scala
+++ b/src/reflect/scala/reflect/internal/util/Position.scala
@@ -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
diff --git a/test/files/neg/macro-invalidret.check b/test/files/neg/macro-invalidret.check
index 6c5baf76b4..6d687557d0 100644
--- a/test/files/neg/macro-invalidret.check
+++ b/test/files/neg/macro-invalidret.check
@@ -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
diff --git a/test/files/neg/t3403.scala b/test/files/neg/t3403.scala
index 8be6ab2a31..7cf0c3e0f7 100644
--- a/test/files/neg/t3403.scala
+++ b/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 }