summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-04-15 02:39:32 +0000
committerPaul Phillips <paulp@improving.org>2011-04-15 02:39:32 +0000
commitbffb951f84e6731ce27eab8dada1653b8bbde34d (patch)
tree6d2333a6f46cecd83f4b473c190bda63da1ddaa9 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent5ff4875db319ee2fef559c3e581100bedc84a184 (diff)
downloadscala-bffb951f84e6731ce27eab8dada1653b8bbde34d.tar.gz
scala-bffb951f84e6731ce27eab8dada1653b8bbde34d.tar.bz2
scala-bffb951f84e6731ce27eab8dada1653b8bbde34d.zip
Some mopping up having to do with deprecated ga...
Some mopping up having to do with deprecated gaining an argument, which may or may not cure scaladoc of its current assertion failure. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 5d6796b41a..fb71c8caae 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2738,10 +2738,13 @@ trait Typers extends Modes {
error(t.pos, "unexpected tree after typing annotation: "+ typedAnn)
}
- if (annType.typeSymbol == DeprecatedAttr && (argss.isEmpty || argss.head.isEmpty))
- unit.deprecationWarning(ann.pos,
- "the `deprecated' annotation now takes a (message: String) as parameter\n"+
- "indicating the reason for deprecation. That message is printed to the console and included in scaladoc.")
+ 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
+ )
if ((typedAnn.tpe == null) || typedAnn.tpe.isErroneous) annotationError
else annInfo(typedAnn)