summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-08-06 15:58:47 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-08-06 15:58:47 +0000
commit95d7ef40ebde72d9300bf64d4a4fc45b5a0508d7 (patch)
tree5eb308ca3dfa9c8cdbf8d5abdbd7c516fe9e4aee /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentd4e2058a3a8d49e4b130223ecaf45036f5d9096d (diff)
downloadscala-95d7ef40ebde72d9300bf64d4a4fc45b5a0508d7.tar.gz
scala-95d7ef40ebde72d9300bf64d4a4fc45b5a0508d7.tar.bz2
scala-95d7ef40ebde72d9300bf64d4a4fc45b5a0508d7.zip
close #2799.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index ddbba00653..cbdbadc4bf 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1290,6 +1290,14 @@ trait Typers { self: Analyzer =>
"implementation restriction: subclassing Classfile does not\n"+
"make your annotation visible at runtime. If that is what\n"+
"you want, you must write the annotation class in Java.")
+ if (phase.id <= currentRun.typerPhase.id) {
+ for (ann <- clazz.getAnnotation(DeprecatedAttr)) {
+ val m = companionModuleOf(clazz, context)
+ if (m != NoSymbol) {
+ m.moduleClass.addAnnotation(AnnotationInfo(ann.atp, ann.args, List()))
+ }
+ }
+ }
treeCopy.ClassDef(cdef, typedMods, cdef.name, tparams1, impl2)
.setType(NoType)
}