diff options
author | Paul Phillips <paulp@improving.org> | 2011-05-01 05:43:05 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-05-01 05:43:05 +0000 |
commit | 445ade0bbd17d8d9336d96fe3804c64e233e8b89 (patch) | |
tree | e30718c66d6925a360552a3f9c989accea081f5f | |
parent | 269ea9ab579f0e7ff14df31caa0981627f051958 (diff) | |
download | scala-445ade0bbd17d8d9336d96fe3804c64e233e8b89.tar.gz scala-445ade0bbd17d8d9336d96fe3804c64e233e8b89.tar.bz2 scala-445ade0bbd17d8d9336d96fe3804c64e233e8b89.zip |
Realized how noisy the @deprecated-takes-two-ar...
Realized how noisy the @deprecated-takes-two-arguments message was and
quieted it down. Oh, and documented the arguments. No review.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 7 | ||||
-rw-r--r-- | src/library/scala/deprecated.scala | 9 |
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 |