diff options
author | Paul Phillips <paulp@improving.org> | 2011-11-23 03:11:53 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-11-23 03:11:53 +0000 |
commit | 25ecde037f22ff92df5459aaa5360a9760f1f05f (patch) | |
tree | 732a46084b7ba949396a6176d6ee1f087ddfadc2 /src/compiler/scala/tools/nsc/typechecker/Namers.scala | |
parent | b93c4a9f97c247f80dd222e1a4855165b6daea60 (diff) | |
download | scala-25ecde037f22ff92df5459aaa5360a9760f1f05f.tar.gz scala-25ecde037f22ff92df5459aaa5360a9760f1f05f.tar.bz2 scala-25ecde037f22ff92df5459aaa5360a9760f1f05f.zip |
Reworked AnnotationInfo patch.
Took a more ambitious swing based on input from martin. Eliminated
the external map and gave annotations a more useful inheritance
hierarchy. Eliminated AnnotationInfoBase and made LazyAnnotationInfo an
AnnotationInfo (just like LazyType is a Type.) Review by odersky.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 960919905d..d503371f5d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1189,14 +1189,14 @@ trait Namers extends MethodSynthesis { // parse the annotations only once. if (!annotated.isInitialized) tree match { case defn: MemberDef => - val ainfos = defn.mods.annotations filter { _ != null } map { ann => + val ainfos = defn.mods.annotations filterNot (_ eq null) map { ann => // need to be lazy, #1782 - LazyAnnotationInfo(() => typer.typedAnnotation(ann)) + AnnotationInfo lazily (typer typedAnnotation ann) } if (ainfos.nonEmpty) { - pendingSymbolAnnotations(annotated) = ainfos + annotated setAnnotations ainfos if (annotated.isTypeSkolem) - pendingSymbolAnnotations(annotated.deSkolemize) = ainfos + annotated.deSkolemize setAnnotations ainfos } case _ => } |