Skip to content

Commit 765ac94

Browse files
committed
SI-7469 Remove misc. @deprecated elements
1 parent ada8d91 commit 765ac94

File tree

11 files changed

+18
-39
lines changed

11 files changed

+18
-39
lines changed

src/library/scala/Predef.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ object Predef extends LowPriorityImplicits with DeprecatedPredef {
9595
type Set[A] = immutable.Set[A]
9696
val Map = immutable.Map
9797
val Set = immutable.Set
98-
// @deprecated("Use scala.AnyRef instead", "2.10.0")
99-
// def AnyRef = scala.AnyRef
10098

10199
// Manifest types, companions, and incantations for summoning
102100
@annotation.implicitNotFound(msg = "No ClassManifest available for ${T}.")

src/library/scala/collection/mutable/AVLTree.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ package collection
1111
package mutable
1212

1313
/**
14-
* An immutable AVL Tree implementation used by mutable.TreeSet
14+
* An immutable AVL Tree implementation formerly used by mutable.TreeSet
1515
*
1616
* @author Lucien Pereira
17-
* @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")
17+
* @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")
1818
*/
1919
private[mutable] sealed trait AVLTree[+A] extends Serializable {
2020
def balance: Int
@@ -65,7 +65,7 @@ private[mutable] sealed trait AVLTree[+A] extends Serializable {
6565
}
6666

6767
/**
68-
* @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")
68+
* @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")
6969
*/
7070
private case object Leaf extends AVLTree[Nothing] {
7171
override val balance: Int = 0
@@ -74,7 +74,7 @@ private case object Leaf extends AVLTree[Nothing] {
7474
}
7575

7676
/**
77-
* @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")
77+
* @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")
7878
*/
7979
private case class Node[A](data: A, left: AVLTree[A], right: AVLTree[A]) extends AVLTree[A] {
8080
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
211211
}
212212

213213
/**
214-
* @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")
214+
* @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")
215215
*/
216216
private class AVLIterator[A](root: Node[A]) extends Iterator[A] {
217217
val stack = mutable.ArrayStack[Node[A]](root)

src/library/scala/io/Position.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ package io
3434
* @author Burak Emir (translated from work by Matthias Zenger and others)
3535
*/
3636
@deprecated("This class will be removed.", "2.10.0")
37-
abstract class Position {
37+
private[scala] abstract class Position {
3838
/** Definable behavior for overflow conditions.
3939
*/
4040
def checkInput(line: Int, column: Int): Unit
@@ -68,7 +68,7 @@ abstract class Position {
6868
def toString(pos: Int): String = line(pos) + ":" + column(pos)
6969
}
7070

71-
object Position extends Position {
71+
private[scala] object Position extends Position {
7272
def checkInput(line: Int, column: Int) {
7373
if (line < 0)
7474
throw new IllegalArgumentException(line + " < 0")

src/library/scala/reflect/package.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,6 @@ package object reflect {
6161
// using the mechanism implemented in `scala.tools.reflect.FastTrack`
6262
// todo. once we have implicit macros for tag generation, we can remove this anchor
6363
private[scala] def materializeClassTag[T](): ClassTag[T] = macro ???
64-
65-
@deprecated("Use `@scala.beans.BeanDescription` instead", "2.10.0")
66-
type BeanDescription = scala.beans.BeanDescription
67-
@deprecated("Use `@scala.beans.BeanDisplayName` instead", "2.10.0")
68-
type BeanDisplayName = scala.beans.BeanDisplayName
69-
@deprecated("Use `@scala.beans.BeanInfo` instead", "2.10.0")
70-
type BeanInfo = scala.beans.BeanInfo
71-
@deprecated("Use `@scala.beans.BeanInfoSkip` instead", "2.10.0")
72-
type BeanInfoSkip = scala.beans.BeanInfoSkip
73-
@deprecated("Use `@scala.beans.BeanProperty` instead", "2.10.0")
74-
type BeanProperty = scala.beans.BeanProperty
75-
@deprecated("Use `@scala.beans.BooleanBeanProperty` instead", "2.10.0")
76-
type BooleanBeanProperty = scala.beans.BooleanBeanProperty
77-
@deprecated("Use `@scala.beans.ScalaBeanInfo` instead", "2.10.0")
78-
type ScalaBeanInfo = scala.beans.ScalaBeanInfo
7964
}
8065

8166
/** An exception that indicates an error during Scala reflection */

src/reflect/scala/reflect/internal/Flags.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,15 +478,15 @@ class Flags extends ModifierFlags {
478478
)
479479

480480
@deprecated("Use flagString on the flag-carrying member", "2.10.0")
481-
def flagsToString(flags: Long, privateWithin: String): String = {
481+
private[scala] def flagsToString(flags: Long, privateWithin: String): String = {
482482
val access = accessString(flags, privateWithin)
483483
val nonAccess = flagsToString(flags & ~AccessFlags)
484484

485485
List(nonAccess, access) filterNot (_ == "") mkString " "
486486
}
487487

488488
@deprecated("Use flagString on the flag-carrying member", "2.10.0")
489-
def flagsToString(flags: Long): String = {
489+
private[scala] def flagsToString(flags: Long): String = {
490490
// Fast path for common case
491491
if (flags == 0L) "" else {
492492
var sb: StringBuilder = null

src/reflect/scala/reflect/internal/Scopes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ trait Scopes extends api.Scopes { self: SymbolTable =>
387387
if (toList forall p) this
388388
else newScopeWith(toList filter p: _*)
389389
)
390-
@deprecated("Use `toList.reverse` instead", "2.10.0")
390+
@deprecated("Use `toList.reverse` instead", "2.10.0") // Used in SBT 0.12.4
391391
def reverse: List[Symbol] = toList.reverse
392392

393393
override def mkString(start: String, sep: String, end: String) =

src/reflect/scala/reflect/internal/SymbolTable.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ abstract class SymbolTable extends macros.Universe
6565
def isPastTyper = false
6666
protected def isDeveloper: Boolean = settings.debug
6767

68-
@deprecated("Give us a reason", "2.10.0")
69-
def abort(): Nothing = abort("unknown error")
70-
7168
@deprecated("Use devWarning if this is really a warning; otherwise use log", "2.11.0")
7269
def debugwarn(msg: => String): Unit = devWarning(msg)
7370

@@ -391,10 +388,9 @@ abstract class SymbolTable extends macros.Universe
391388
*/
392389
def isCompilerUniverse = false
393390

394-
@deprecated("Use enteringPhase", "2.10.0")
391+
@deprecated("Use enteringPhase", "2.10.0") // Used in SBT 0.12.4
395392
@inline final def atPhase[T](ph: Phase)(op: => T): T = enteringPhase(ph)(op)
396-
@deprecated("Use enteringPhaseNotLaterThan", "2.10.0")
397-
@inline final def atPhaseNotLaterThan[T](target: Phase)(op: => T): T = enteringPhaseNotLaterThan(target)(op)
393+
398394

399395
/**
400396
* Adds the `sm` String interpolator to a [[scala.StringContext]].

src/reflect/scala/reflect/internal/Types.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ trait Types
895895
if (sym == btssym) return mid
896896
else if (sym isLess btssym) hi = mid - 1
897897
else if (btssym isLess sym) lo = mid + 1
898-
else abort()
898+
else abort("sym is neither `sym == btssym`, `sym isLess btssym` nor `btssym isLess sym`")
899899
}
900900
-1
901901
}
@@ -3601,7 +3601,7 @@ trait Types
36013601
}
36023602
def genPolyType(params: List[Symbol], tpe: Type): Type = GenPolyType(params, tpe)
36033603

3604-
@deprecated("use genPolyType(...) instead", "2.10.0")
3604+
@deprecated("use genPolyType(...) instead", "2.10.0") // Used in reflection API
36053605
def polyType(params: List[Symbol], tpe: Type): Type = GenPolyType(params, tpe)
36063606

36073607
/** A creator for anonymous type functions, where the symbol for the type function still needs to be created.

src/reflect/scala/reflect/internal/util/Position.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ private[util] trait InternalPositionImpl {
239239
private[util] trait DeprecatedPosition {
240240
self: Position =>
241241

242-
@deprecated("use `point`", "2.9.0")
243-
def offset: Option[Int] = if (isDefined) Some(point) else None // used by sbt
242+
@deprecated("use `point`", "2.9.0") // Used in SBT 0.12.4
243+
def offset: Option[Int] = if (isDefined) Some(point) else None
244244

245245
@deprecated("use `focus`", "2.11.0")
246246
def toSingleLine: Position = this

test/files/neg/macro-invalidret.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Macros_Test_2.scala:7: warning: macro defs must have explicitly specified return
2020
^
2121
Macros_Test_2.scala:14: error: exception during macro expansion:
2222
scala.NotImplementedError: an implementation is missing
23-
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:227)
23+
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
2424
at Impls$.foo3(Impls_1.scala:7)
2525

2626
foo3

0 commit comments

Comments
 (0)