summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala7
-rw-r--r--src/library/scala/deprecated.scala9
2 files changed, 6 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 4a62c7c70d..19d520e28e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2769,12 +2769,7 @@ trait Typers extends Modes {
}
if (annType.typeSymbol == DeprecatedAttr && argss.flatten.size < 2)
- unit.deprecationWarning(ann.pos, """
- |The `deprecated` annotation now takes two String parameters: the first is
- |an explanation and/or recommended alternative, which will be printed to the
- |console and also appear in the scaladoc. The second is the first released
- |version in which the member was deprecated.""".trim.stripMargin
- )
+ unit.deprecationWarning(ann.pos, "@deprecated now takes two arguments; see the scaladoc.")
if ((typedAnn.tpe == null) || typedAnn.tpe.isErroneous) annotationError
else annInfo(typedAnn)
diff --git a/src/library/scala/deprecated.scala b/src/library/scala/deprecated.scala
index f64e34a5ac..53f5c456c2 100644
--- a/src/library/scala/deprecated.scala
+++ b/src/library/scala/deprecated.scala
@@ -10,11 +10,12 @@ package scala
import annotation.target._
-/**
- * An annotation that designates the definition to which it is applied as deprecated.
- * Access to the member then generates a deprecated warning.
+/** An annotation that designates that a definition is deprecated.
+ * Access to the member then generates a deprecated warning.
*
- * @since 2.3
+ * @param message the message to print during compilation if the definition is accessed
+ * @param since a string identifying the first version in which the definition was deprecated
+ * @since 2.3
*/
@getter @setter @beanGetter @beanSetter
class deprecated(message: String = "", since: String = "") extends annotation.StaticAnnotation