summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/Reporting.scala5
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Adaptations.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala5
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala7
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala7
-rw-r--r--src/library/scala/collection/convert/package.scala12
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala27
-rw-r--r--test/files/jvm/t8582.check2
-rw-r--r--test/files/neg/beanInfoDeprecation.check2
-rw-r--r--test/files/neg/classmanifests_new_deprecations.check16
-rw-r--r--test/files/neg/delayed-init-ref.check2
-rw-r--r--test/files/neg/names-defaults-neg-warn.check4
-rw-r--r--test/files/neg/names-defaults-neg.check6
-rw-r--r--test/files/neg/t4851.check8
-rw-r--r--test/files/neg/t6120.check4
-rw-r--r--test/files/neg/t6162-inheritance.check2
-rw-r--r--test/files/neg/t6162-overriding.check2
-rw-r--r--test/files/neg/t6406-regextract.check2
-rw-r--r--test/files/neg/t7294b.check2
-rw-r--r--test/files/neg/t7783.check10
-rw-r--r--test/files/neg/t8035-deprecated.check6
-rw-r--r--test/files/neg/t8685.check28
-rw-r--r--test/files/neg/t9684.check4
-rw-r--r--test/files/run/t3235-minimal.check8
-rw-r--r--test/files/run/t4542.check2
-rw-r--r--test/files/run/t4594-repl-settings.scala2
-rw-r--r--test/files/run/toolbox_console_reporter.check4
-rw-r--r--test/files/run/toolbox_silent_reporter.check2
28 files changed, 96 insertions, 87 deletions
diff --git a/src/compiler/scala/tools/nsc/Reporting.scala b/src/compiler/scala/tools/nsc/Reporting.scala
index 8d0aedc76d..325537a5a8 100644
--- a/src/compiler/scala/tools/nsc/Reporting.scala
+++ b/src/compiler/scala/tools/nsc/Reporting.scala
@@ -68,8 +68,9 @@ trait Reporting extends scala.reflect.internal.Reporting { self: ast.Positions w
// behold! the symbol that caused the deprecation warning (may not be deprecated itself)
def deprecationWarning(pos: Position, sym: Symbol, msg: String): Unit = _deprecationWarnings.warn(pos, msg)
def deprecationWarning(pos: Position, sym: Symbol): Unit = {
- val suffix = sym.deprecationMessage match { case Some(msg) => ": "+ msg case _ => "" }
- deprecationWarning(pos, sym, s"$sym${sym.locationString} is deprecated$suffix")
+ val version = sym.deprecationVersion match { case Some(ver) => s" (since $ver)" case _ => "" }
+ val message = sym.deprecationMessage match { case Some(msg) => s": $msg" case _ => "" }
+ deprecationWarning(pos, sym, s"$sym${sym.locationString} is deprecated$version$message")
}
private[this] var reportedFeature = Set[Symbol]()
diff --git a/src/compiler/scala/tools/nsc/typechecker/Adaptations.scala b/src/compiler/scala/tools/nsc/typechecker/Adaptations.scala
index 2f4d228347..46561de78f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Adaptations.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Adaptations.scala
@@ -74,7 +74,7 @@ trait Adaptations {
if (settings.future)
context.error(t.pos, adaptWarningMessage("Adaptation of argument list by inserting () has been removed.", showAdaptation = false))
else {
- val msg = "Adaptation of argument list by inserting () has been deprecated: " + (
+ val msg = "Adaptation of argument list by inserting () is deprecated: " + (
if (isLeakyTarget) "leaky (Object-receiving) target makes this especially dangerous."
else "this is unlikely to be what you want.")
context.deprecationWarning(t.pos, t.symbol, adaptWarningMessage(msg))
diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
index 5062289ed1..063cfd3805 100644
--- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
@@ -565,14 +565,15 @@ trait NamesDefaults { self: Analyzer =>
case Some(`name`) => true
case Some(nme.NO_NAME) => anonOK
}
+ def since = param.deprecatedParamVersion.map(ver => s" (since $ver)").getOrElse("")
def checkName = {
val res = param.name == name
- if (res && checkDeprecation(true)) warn(s"naming parameter $name has been deprecated.")
+ if (res && checkDeprecation(true)) warn(s"naming parameter $name is deprecated$since.")
res
}
def checkAltName = {
val res = checkDeprecation(false)
- if (res) warn(s"the parameter name $name has been deprecated. Use ${param.name} instead.")
+ if (res) warn(s"the parameter name $name is deprecated$since: Use ${param.name} instead")
res
}
!param.isSynthetic && (checkName || checkAltName)
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index da269168ec..3aea64a1f2 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -548,9 +548,10 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
def checkOverrideDeprecated() {
if (other.hasDeprecatedOverridingAnnotation && !member.ownerChain.exists(x => x.isDeprecated || x.hasBridgeAnnotation)) {
- val suffix = other.deprecatedOverridingMessage map (": " + _) getOrElse ""
- val msg = s"overriding ${other.fullLocationString} is deprecated$suffix"
- currentRun.reporting.deprecationWarning(member.pos, other, msg)
+ val version = other.deprecatedOverridingVersion map (ver => s" (since $ver)") getOrElse ""
+ val message = other.deprecatedOverridingMessage map (msg => s": $msg") getOrElse ""
+ val report = s"overriding ${other.fullLocationString} is deprecated$version$message"
+ currentRun.reporting.deprecationWarning(member.pos, other, report)
}
}
}
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 1aed9c3a64..d44a0eaf59 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1704,9 +1704,10 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
if (!isPastTyper && psym.hasDeprecatedInheritanceAnnotation &&
!sameSourceFile && !context.owner.ownerChain.exists(x => x.isDeprecated || x.hasBridgeAnnotation)) {
- val suffix = psym.deprecatedInheritanceMessage map (": " + _) getOrElse ""
- val msg = s"inheritance from ${psym.fullLocationString} is deprecated$suffix"
- context.deprecationWarning(parent.pos, psym, msg)
+ val version = psym.deprecatedInheritanceVersion map (ver => s" (since $ver)") getOrElse ""
+ val message = psym.deprecatedInheritanceMessage map (msg => s": $msg") getOrElse ""
+ val report = s"inheritance from ${psym.fullLocationString} is deprecated$version$message"
+ context.deprecationWarning(parent.pos, psym, report)
}
if (psym.isSealed && !phase.erasedTypes)
diff --git a/src/library/scala/collection/convert/package.scala b/src/library/scala/collection/convert/package.scala
index 7f48023b58..fe1951b6cf 100644
--- a/src/library/scala/collection/convert/package.scala
+++ b/src/library/scala/collection/convert/package.scala
@@ -10,17 +10,17 @@ package scala
package collection
package object convert {
- @deprecated("Use JavaConverters", since="2.12")
+ @deprecated("use JavaConverters", since="2.12")
val decorateAsJava = new DecorateAsJava { }
- @deprecated("Use JavaConverters", since="2.12")
+ @deprecated("use JavaConverters", since="2.12")
val decorateAsScala = new DecorateAsScala { }
- @deprecated("Use JavaConverters", since="2.12")
+ @deprecated("use JavaConverters", since="2.12")
val decorateAll = JavaConverters
- @deprecated("Use JavaConverters or consider ImplicitConversionsToJava", since="2.12")
+ @deprecated("use JavaConverters or consider ImplicitConversionsToJava", since="2.12")
val wrapAsJava = new WrapAsJava { }
- @deprecated("Use JavaConverters or consider ImplicitConversionsToScala", since="2.12")
+ @deprecated("use JavaConverters or consider ImplicitConversionsToScala", since="2.12")
val wrapAsScala = new WrapAsScala { }
- @deprecated("Use JavaConverters or consider ImplicitConversions", since="2.12")
+ @deprecated("use JavaConverters or consider ImplicitConversions", since="2.12")
val wrapAll = new WrapAsJava with WrapAsScala { }
}
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index ed51414382..8f24b435b3 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -871,21 +871,26 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
)
}
- def isStrictFP = hasAnnotation(ScalaStrictFPAttr) || (enclClass hasAnnotation ScalaStrictFPAttr)
- def isSerializable = info.baseClasses.exists(p => p == SerializableClass || p == JavaSerializableClass)
- def hasBridgeAnnotation = hasAnnotation(BridgeClass)
- def isDeprecated = hasAnnotation(DeprecatedAttr)
- def deprecationMessage = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 0)
- def deprecationVersion = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 1)
- def deprecatedParamName = getAnnotation(DeprecatedNameAttr) flatMap (_ symbolArg 0 orElse Some(nme.NO_NAME))
+ def isStrictFP = hasAnnotation(ScalaStrictFPAttr) || (enclClass hasAnnotation ScalaStrictFPAttr)
+ def isSerializable = info.baseClasses.exists(p => p == SerializableClass || p == JavaSerializableClass)
+ def hasBridgeAnnotation = hasAnnotation(BridgeClass)
+ def isDeprecated = hasAnnotation(DeprecatedAttr)
+ def deprecationMessage = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 0)
+ def deprecationVersion = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 1)
+ def deprecatedParamName = getAnnotation(DeprecatedNameAttr) flatMap (_ symbolArg 0 orElse Some(nme.NO_NAME))
+ def deprecatedParamVersion = getAnnotation(DeprecatedNameAttr) flatMap (_ stringArg 1)
def hasDeprecatedInheritanceAnnotation
- = hasAnnotation(DeprecatedInheritanceAttr)
+ = hasAnnotation(DeprecatedInheritanceAttr)
def deprecatedInheritanceMessage
- = getAnnotation(DeprecatedInheritanceAttr) flatMap (_ stringArg 0)
+ = getAnnotation(DeprecatedInheritanceAttr) flatMap (_ stringArg 0)
+ def deprecatedInheritanceVersion
+ = getAnnotation(DeprecatedInheritanceAttr) flatMap (_ stringArg 1)
def hasDeprecatedOverridingAnnotation
- = hasAnnotation(DeprecatedOverridingAttr)
+ = hasAnnotation(DeprecatedOverridingAttr)
def deprecatedOverridingMessage
- = getAnnotation(DeprecatedOverridingAttr) flatMap (_ stringArg 0)
+ = getAnnotation(DeprecatedOverridingAttr) flatMap (_ stringArg 0)
+ def deprecatedOverridingVersion
+ = getAnnotation(DeprecatedOverridingAttr) flatMap (_ stringArg 1)
// !!! when annotation arguments are not literal strings, but any sort of
// assembly of strings, there is a fair chance they will turn up here not as
diff --git a/test/files/jvm/t8582.check b/test/files/jvm/t8582.check
index 0e4da90398..0a23cb0c93 100644
--- a/test/files/jvm/t8582.check
+++ b/test/files/jvm/t8582.check
@@ -1,4 +1,4 @@
-t8582.scala:17: warning: class BeanInfo in package beans is deprecated: the generation of BeanInfo classes is no longer supported
+t8582.scala:17: warning: class BeanInfo in package beans is deprecated (since 2.12.0): the generation of BeanInfo classes is no longer supported
class C1
^
getClass on module gives module class
diff --git a/test/files/neg/beanInfoDeprecation.check b/test/files/neg/beanInfoDeprecation.check
index 788b277818..a91cdabae2 100644
--- a/test/files/neg/beanInfoDeprecation.check
+++ b/test/files/neg/beanInfoDeprecation.check
@@ -1,4 +1,4 @@
-beanInfoDeprecation.scala:2: warning: class BeanInfo in package beans is deprecated: the generation of BeanInfo classes is no longer supported
+beanInfoDeprecation.scala:2: warning: class BeanInfo in package beans is deprecated (since 2.12.0): the generation of BeanInfo classes is no longer supported
class C
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/classmanifests_new_deprecations.check b/test/files/neg/classmanifests_new_deprecations.check
index fd1e2728c3..1b63303fd4 100644
--- a/test/files/neg/classmanifests_new_deprecations.check
+++ b/test/files/neg/classmanifests_new_deprecations.check
@@ -1,25 +1,25 @@
-classmanifests_new_deprecations.scala:2: warning: type ClassManifest in object Predef is deprecated: Use `scala.reflect.ClassTag` instead
+classmanifests_new_deprecations.scala:2: warning: type ClassManifest in object Predef is deprecated (since 2.10.0): Use `scala.reflect.ClassTag` instead
def cm1[T: ClassManifest] = ???
^
-classmanifests_new_deprecations.scala:3: warning: type ClassManifest in object Predef is deprecated: Use `scala.reflect.ClassTag` instead
+classmanifests_new_deprecations.scala:3: warning: type ClassManifest in object Predef is deprecated (since 2.10.0): Use `scala.reflect.ClassTag` instead
def cm2[T](implicit evidence$1: ClassManifest[T]) = ???
^
-classmanifests_new_deprecations.scala:4: warning: type ClassManifest in object Predef is deprecated: Use `scala.reflect.ClassTag` instead
+classmanifests_new_deprecations.scala:4: warning: type ClassManifest in object Predef is deprecated (since 2.10.0): Use `scala.reflect.ClassTag` instead
val cm3: ClassManifest[Int] = null
^
-classmanifests_new_deprecations.scala:6: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+classmanifests_new_deprecations.scala:6: warning: type ClassManifest in package reflect is deprecated (since 2.10.0): Use scala.reflect.ClassTag instead
def rcm1[T: scala.reflect.ClassManifest] = ???
^
-classmanifests_new_deprecations.scala:7: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+classmanifests_new_deprecations.scala:7: warning: type ClassManifest in package reflect is deprecated (since 2.10.0): Use scala.reflect.ClassTag instead
def rcm2[T](implicit evidence$1: scala.reflect.ClassManifest[T]) = ???
^
-classmanifests_new_deprecations.scala:8: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+classmanifests_new_deprecations.scala:8: warning: type ClassManifest in package reflect is deprecated (since 2.10.0): Use scala.reflect.ClassTag instead
val rcm3: scala.reflect.ClassManifest[Int] = null
^
-classmanifests_new_deprecations.scala:10: warning: type ClassManifest in object Predef is deprecated: Use `scala.reflect.ClassTag` instead
+classmanifests_new_deprecations.scala:10: warning: type ClassManifest in object Predef is deprecated (since 2.10.0): Use `scala.reflect.ClassTag` instead
type CM[T] = ClassManifest[T]
^
-classmanifests_new_deprecations.scala:15: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+classmanifests_new_deprecations.scala:15: warning: type ClassManifest in package reflect is deprecated (since 2.10.0): Use scala.reflect.ClassTag instead
type RCM[T] = scala.reflect.ClassManifest[T]
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/delayed-init-ref.check b/test/files/neg/delayed-init-ref.check
index 90bc027969..1b6ba5c364 100644
--- a/test/files/neg/delayed-init-ref.check
+++ b/test/files/neg/delayed-init-ref.check
@@ -4,7 +4,7 @@ delayed-init-ref.scala:17: warning: Selecting value vall from object O, which ex
delayed-init-ref.scala:19: warning: Selecting value vall from object O, which extends scala.DelayedInit, is likely to yield an uninitialized value
println(vall) // warn
^
-delayed-init-ref.scala:28: warning: trait DelayedInit in package scala is deprecated: DelayedInit semantics can be surprising. Support for `App` will continue.
+delayed-init-ref.scala:28: warning: trait DelayedInit in package scala is deprecated (since 2.11.0): DelayedInit semantics can be surprising. Support for `App` will continue.
See the release notes for more details: https://github.com/scala/scala/releases/tag/v2.11.0-RC1
trait Before extends DelayedInit {
^
diff --git a/test/files/neg/names-defaults-neg-warn.check b/test/files/neg/names-defaults-neg-warn.check
index 0f4edef84e..14a1e50e68 100644
--- a/test/files/neg/names-defaults-neg-warn.check
+++ b/test/files/neg/names-defaults-neg-warn.check
@@ -1,7 +1,7 @@
-names-defaults-neg-warn.scala:11: warning: the parameter name s has been deprecated. Use x instead.
+names-defaults-neg-warn.scala:11: warning: the parameter name s is deprecated: Use x instead
deprNam2.f(s = "dlfkj")
^
-names-defaults-neg-warn.scala:12: warning: the parameter name x has been deprecated. Use s instead.
+names-defaults-neg-warn.scala:12: warning: the parameter name x is deprecated: Use s instead
deprNam2.g(x = "dlkjf")
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check
index 875bc2ade0..e6929cb52e 100644
--- a/test/files/neg/names-defaults-neg.check
+++ b/test/files/neg/names-defaults-neg.check
@@ -112,16 +112,16 @@ names-defaults-neg.scala:90: error: deprecated parameter name x has to be distin
names-defaults-neg.scala:91: error: deprecated parameter name a has to be distinct from any other parameter name (deprecated or not).
def deprNam2(a: String)(@deprecatedName('a) b: Int) = 1
^
-names-defaults-neg.scala:93: warning: the parameter name y has been deprecated. Use b instead.
+names-defaults-neg.scala:93: warning: the parameter name y is deprecated: Use b instead
deprNam3(y = 10, b = 2)
^
names-defaults-neg.scala:93: error: parameter 'b' is already specified at parameter position 1
deprNam3(y = 10, b = 2)
^
-names-defaults-neg.scala:96: warning: naming parameter deprNam4Arg has been deprecated.
+names-defaults-neg.scala:96: warning: naming parameter deprNam4Arg is deprecated.
deprNam4(deprNam4Arg = null)
^
-names-defaults-neg.scala:98: warning: naming parameter deprNam5Arg has been deprecated.
+names-defaults-neg.scala:98: warning: naming parameter deprNam5Arg is deprecated.
deprNam5(deprNam5Arg = null)
^
names-defaults-neg.scala:102: error: unknown parameter name: m
diff --git a/test/files/neg/t4851.check b/test/files/neg/t4851.check
index d5711a889b..ac0854f810 100644
--- a/test/files/neg/t4851.check
+++ b/test/files/neg/t4851.check
@@ -1,10 +1,10 @@
-S.scala:2: warning: Adaptation of argument list by inserting () has been deprecated: leaky (Object-receiving) target makes this especially dangerous.
+S.scala:2: warning: Adaptation of argument list by inserting () is deprecated: leaky (Object-receiving) target makes this especially dangerous.
signature: J(x: Any): J
given arguments: <none>
after adaptation: new J((): Unit)
val x1 = new J
^
-S.scala:3: warning: Adaptation of argument list by inserting () has been deprecated: leaky (Object-receiving) target makes this especially dangerous.
+S.scala:3: warning: Adaptation of argument list by inserting () is deprecated: leaky (Object-receiving) target makes this especially dangerous.
signature: J(x: Any): J
given arguments: <none>
after adaptation: new J((): Unit)
@@ -28,13 +28,13 @@ S.scala:7: warning: Adapting argument list by creating a 3-tuple: this may not b
after adaptation: new Some((1, 2, 3): (Int, Int, Int))
val y2 = new Some(1, 2, 3)
^
-S.scala:9: warning: Adaptation of argument list by inserting () has been deprecated: this is unlikely to be what you want.
+S.scala:9: warning: Adaptation of argument list by inserting () is deprecated: this is unlikely to be what you want.
signature: J2(x: T): J2[T]
given arguments: <none>
after adaptation: new J2((): Unit)
val z1 = new J2
^
-S.scala:10: warning: Adaptation of argument list by inserting () has been deprecated: this is unlikely to be what you want.
+S.scala:10: warning: Adaptation of argument list by inserting () is deprecated: this is unlikely to be what you want.
signature: J2(x: T): J2[T]
given arguments: <none>
after adaptation: new J2((): Unit)
diff --git a/test/files/neg/t6120.check b/test/files/neg/t6120.check
index f432fde32f..b7a5d8bf17 100644
--- a/test/files/neg/t6120.check
+++ b/test/files/neg/t6120.check
@@ -6,13 +6,13 @@ See the Scaladoc for value scala.language.postfixOps for a discussion
why the feature should be explicitly enabled.
def f = null == null bippy
^
-t6120.scala:5: warning: method bippy in class BooleanOps is deprecated: bobo
+t6120.scala:5: warning: method bippy in class BooleanOps is deprecated (since 2.11.0): bobo
def f = null == null bippy
^
t6120.scala:5: warning: comparing values of types Null and Null using `==' will always yield true
def f = null == null bippy
^
-t6120.scala:6: warning: method bippy in class BooleanOps is deprecated: bobo
+t6120.scala:6: warning: method bippy in class BooleanOps is deprecated (since 2.11.0): bobo
def g = true.bippy
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/t6162-inheritance.check b/test/files/neg/t6162-inheritance.check
index c9f4ddaec1..9b0a8990da 100644
--- a/test/files/neg/t6162-inheritance.check
+++ b/test/files/neg/t6162-inheritance.check
@@ -1,4 +1,4 @@
-usage.scala:3: warning: inheritance from class Foo in package t6126 is deprecated: `Foo` will be made final in a future version.
+usage.scala:3: warning: inheritance from class Foo in package t6126 is deprecated (since 2.10.0): `Foo` will be made final in a future version.
class SubFoo extends Foo
^
usage.scala:5: warning: inheritance from trait T in package t6126 is deprecated
diff --git a/test/files/neg/t6162-overriding.check b/test/files/neg/t6162-overriding.check
index 6bff75d88d..586bfb4b35 100644
--- a/test/files/neg/t6162-overriding.check
+++ b/test/files/neg/t6162-overriding.check
@@ -1,4 +1,4 @@
-t6162-overriding.scala:14: warning: overriding method bar in class Bar is deprecated: `bar` will be made private in a future version.
+t6162-overriding.scala:14: warning: overriding method bar in class Bar is deprecated (since 2.10.0): `bar` will be made private in a future version.
override def bar = 43
^
t6162-overriding.scala:15: warning: overriding method baz in class Bar is deprecated
diff --git a/test/files/neg/t6406-regextract.check b/test/files/neg/t6406-regextract.check
index 19425a68b0..b49b6656f5 100644
--- a/test/files/neg/t6406-regextract.check
+++ b/test/files/neg/t6406-regextract.check
@@ -1,4 +1,4 @@
-t6406-regextract.scala:4: warning: method unapplySeq in class Regex is deprecated: Extracting a match result from anything but a CharSequence or Match is deprecated
+t6406-regextract.scala:4: warning: method unapplySeq in class Regex is deprecated (since 2.11.0): Extracting a match result from anything but a CharSequence or Match is deprecated
List(1) collect { case r(i) => i }
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/t7294b.check b/test/files/neg/t7294b.check
index 0033b72125..707266f0cc 100644
--- a/test/files/neg/t7294b.check
+++ b/test/files/neg/t7294b.check
@@ -1,4 +1,4 @@
-t7294b.scala:1: warning: inheritance from class Tuple2 in package scala is deprecated: Tuples will be made final in a future version.
+t7294b.scala:1: warning: inheritance from class Tuple2 in package scala is deprecated (since 2.11.0): Tuples will be made final in a future version.
class C extends Tuple2[Int, Int](0, 0)
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/t7783.check b/test/files/neg/t7783.check
index 647cfee121..18dc84a8db 100644
--- a/test/files/neg/t7783.check
+++ b/test/files/neg/t7783.check
@@ -1,16 +1,16 @@
-t7783.scala:1: warning: type D in object O is deprecated:
+t7783.scala:1: warning: type D in object O is deprecated (since ):
object O { class C; @deprecated("", "") type D = C; def foo: Seq[D] = Nil }
^
-t7783.scala:11: warning: type D in object O is deprecated:
+t7783.scala:11: warning: type D in object O is deprecated (since ):
type T = O.D
^
-t7783.scala:12: warning: type D in object O is deprecated:
+t7783.scala:12: warning: type D in object O is deprecated (since ):
locally(null: O.D)
^
-t7783.scala:13: warning: type D in object O is deprecated:
+t7783.scala:13: warning: type D in object O is deprecated (since ):
val x: O.D = null
^
-t7783.scala:14: warning: type D in object O is deprecated:
+t7783.scala:14: warning: type D in object O is deprecated (since ):
locally(null.asInstanceOf[O.D])
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/t8035-deprecated.check b/test/files/neg/t8035-deprecated.check
index 01f27e5310..35aba5551d 100644
--- a/test/files/neg/t8035-deprecated.check
+++ b/test/files/neg/t8035-deprecated.check
@@ -1,16 +1,16 @@
-t8035-deprecated.scala:2: warning: Adaptation of argument list by inserting () has been deprecated: this is unlikely to be what you want.
+t8035-deprecated.scala:2: warning: Adaptation of argument list by inserting () is deprecated: this is unlikely to be what you want.
signature: GenSetLike.apply(elem: A): Boolean
given arguments: <none>
after adaptation: GenSetLike((): Unit)
List(1,2,3).toSet()
^
-t8035-deprecated.scala:5: warning: Adaptation of argument list by inserting () has been deprecated: this is unlikely to be what you want.
+t8035-deprecated.scala:5: warning: Adaptation of argument list by inserting () is deprecated: this is unlikely to be what you want.
signature: A(x: T): Foo.A[T]
given arguments: <none>
after adaptation: new A((): Unit)
new A
^
-t8035-deprecated.scala:9: warning: Adaptation of argument list by inserting () has been deprecated: leaky (Object-receiving) target makes this especially dangerous.
+t8035-deprecated.scala:9: warning: Adaptation of argument list by inserting () is deprecated: leaky (Object-receiving) target makes this especially dangerous.
signature: Format.format(x$1: Any): String
given arguments: <none>
after adaptation: Format.format((): Unit)
diff --git a/test/files/neg/t8685.check b/test/files/neg/t8685.check
index 1780a20b6e..685fd2e951 100644
--- a/test/files/neg/t8685.check
+++ b/test/files/neg/t8685.check
@@ -1,43 +1,43 @@
-t8685.scala:6: warning: constructor D in class D is deprecated: ctor D is depr
+t8685.scala:6: warning: constructor D in class D is deprecated (since now): ctor D is depr
case class D @deprecated("ctor D is depr", since="now") (i: Int)
^
-t8685.scala:35: warning: class C is deprecated: class C is depr
+t8685.scala:35: warning: class C is deprecated (since now): class C is depr
def f = C(42)
^
-t8685.scala:37: warning: object E is deprecated: module E is depr
+t8685.scala:37: warning: object E is deprecated (since now): module E is depr
def h = E(42)
^
-t8685.scala:37: warning: class E is deprecated: class E is depr
+t8685.scala:37: warning: class E is deprecated (since now): class E is depr
def h = E(42)
^
-t8685.scala:38: warning: object F is deprecated: module F is depr
+t8685.scala:38: warning: object F is deprecated (since now): module F is depr
def i = F.G(42)
^
-t8685.scala:39: warning: object F in object Extra is deprecated: Extra module F is depr
+t8685.scala:39: warning: object F in object Extra is deprecated (since now): Extra module F is depr
def j = Extra.F.G(42)
^
-t8685.scala:43: warning: value gg in trait Applies is deprecated: member gg
+t8685.scala:43: warning: value gg in trait Applies is deprecated (since now): member gg
def k = this.gg.H(0)
^
-t8685.scala:45: warning: class K in object J is deprecated: Inner K is depr
+t8685.scala:45: warning: class K in object J is deprecated (since now): Inner K is depr
def l = J.K(42)
^
-t8685.scala:48: warning: class C is deprecated: class C is depr
+t8685.scala:48: warning: class C is deprecated (since now): class C is depr
def f = new C(42)
^
-t8685.scala:49: warning: constructor D in class D is deprecated: ctor D is depr
+t8685.scala:49: warning: constructor D in class D is deprecated (since now): ctor D is depr
def g = new D(42)
^
-t8685.scala:50: warning: class E is deprecated: class E is depr
+t8685.scala:50: warning: class E is deprecated (since now): class E is depr
def h = new E(42)
^
-t8685.scala:51: warning: object F is deprecated: module F is depr
+t8685.scala:51: warning: object F is deprecated (since now): module F is depr
def i = new F.G(42)
^
-t8685.scala:52: warning: object F in object Extra is deprecated: Extra module F is depr
+t8685.scala:52: warning: object F in object Extra is deprecated (since now): Extra module F is depr
def j = new Extra.F.G(42)
^
-t8685.scala:53: warning: class K in object J is deprecated: Inner K is depr
+t8685.scala:53: warning: class K in object J is deprecated (since now): Inner K is depr
def l = new J.K(42)
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/neg/t9684.check b/test/files/neg/t9684.check
index 833ca3341a..ab36479a47 100644
--- a/test/files/neg/t9684.check
+++ b/test/files/neg/t9684.check
@@ -1,7 +1,7 @@
-t9684.scala:6: warning: object JavaConversions in package collection is deprecated: Use JavaConverters
+t9684.scala:6: warning: object JavaConversions in package collection is deprecated (since 2.12): Use JavaConverters
null.asInstanceOf[java.util.List[Int]] : Buffer[Int]
^
-t9684.scala:8: warning: object JavaConversions in package collection is deprecated: Use JavaConverters
+t9684.scala:8: warning: object JavaConversions in package collection is deprecated (since 2.12): Use JavaConverters
null.asInstanceOf[Iterable[Int]] : java.util.Collection[Int]
^
error: No warnings can be incurred under -Xfatal-warnings.
diff --git a/test/files/run/t3235-minimal.check b/test/files/run/t3235-minimal.check
index d7f716002f..5b06572191 100644
--- a/test/files/run/t3235-minimal.check
+++ b/test/files/run/t3235-minimal.check
@@ -1,12 +1,12 @@
-t3235-minimal.scala:3: warning: method round in class RichInt is deprecated: This is an integer type; there is no reason to round it. Perhaps you meant to call this on a floating-point value?
+t3235-minimal.scala:3: warning: method round in class RichInt is deprecated (since 2.11.0): This is an integer type; there is no reason to round it. Perhaps you meant to call this on a floating-point value?
assert(123456789.round == 123456789)
^
-t3235-minimal.scala:4: warning: method round in package math is deprecated: This is an integer type; there is no reason to round it. Perhaps you meant to call this with a floating-point value?
+t3235-minimal.scala:4: warning: method round in package math is deprecated (since 2.11.0): This is an integer type; there is no reason to round it. Perhaps you meant to call this with a floating-point value?
assert(math.round(123456789) == 123456789)
^
-t3235-minimal.scala:5: warning: method round in class RichLong is deprecated: This is an integer type; there is no reason to round it. Perhaps you meant to call this on a floating-point value?
+t3235-minimal.scala:5: warning: method round in class RichLong is deprecated (since 2.11.0): This is an integer type; there is no reason to round it. Perhaps you meant to call this on a floating-point value?
assert(1234567890123456789L.round == 1234567890123456789L)
^
-t3235-minimal.scala:6: warning: method round in package math is deprecated: This is an integer type; there is no reason to round it. Perhaps you meant to call this with a floating-point value?
+t3235-minimal.scala:6: warning: method round in package math is deprecated (since 2.11.0): This is an integer type; there is no reason to round it. Perhaps you meant to call this with a floating-point value?
assert(math.round(1234567890123456789L) == 1234567890123456789L)
^
diff --git a/test/files/run/t4542.check b/test/files/run/t4542.check
index 6e099222b0..942de545b5 100644
--- a/test/files/run/t4542.check
+++ b/test/files/run/t4542.check
@@ -5,7 +5,7 @@ scala> @deprecated("foooo", "ReplTest version 1.0-FINAL") class Foo() {
defined class Foo
scala> val f = new Foo
-<console>:12: warning: class Foo is deprecated: foooo
+<console>:12: warning: class Foo is deprecated (since ReplTest version 1.0-FINAL): foooo
val f = new Foo
^
f: Foo = Bippy
diff --git a/test/files/run/t4594-repl-settings.scala b/test/files/run/t4594-repl-settings.scala
index f2d1a8b3f8..8ececce24a 100644
--- a/test/files/run/t4594-repl-settings.scala
+++ b/test/files/run/t4594-repl-settings.scala
@@ -15,7 +15,7 @@ object Test extends SessionTest {
|scala> :settings -deprecation
|
|scala> def b = depp
- |<console>:12: warning: method depp is deprecated: Please don't do that.
+ |<console>:12: warning: method depp is deprecated (since Time began.): Please don't do that.
| def b = depp
| ^
|b: String
diff --git a/test/files/run/toolbox_console_reporter.check b/test/files/run/toolbox_console_reporter.check
index 1395c68740..fca10ba458 100644
--- a/test/files/run/toolbox_console_reporter.check
+++ b/test/files/run/toolbox_console_reporter.check
@@ -1,8 +1,8 @@
hello
============compiler console=============
-warning: method foo in object Utils is deprecated: test
+warning: method foo in object Utils is deprecated (since 2.10.0): test
=========================================
============compiler messages============
-Info(NoPosition,method foo in object Utils is deprecated: test,WARNING)
+Info(NoPosition,method foo in object Utils is deprecated (since 2.10.0): test,WARNING)
=========================================
diff --git a/test/files/run/toolbox_silent_reporter.check b/test/files/run/toolbox_silent_reporter.check
index 2d05b1e3f8..dff89f635f 100644
--- a/test/files/run/toolbox_silent_reporter.check
+++ b/test/files/run/toolbox_silent_reporter.check
@@ -1,4 +1,4 @@
hello
============compiler messages============
-Info(NoPosition,method foo in object Utils is deprecated: test,WARNING)
+Info(NoPosition,method foo in object Utils is deprecated (since 2.10.0): test,WARNING)
=========================================