From 7e60221120015be2607947f2de55ca4984db7077 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 22 Apr 2015 13:15:11 +0200 Subject: Roll InstChecks into PostTyper Move InstChecks functionality into PostTyper in order to save a separate traversal. --- src/dotty/tools/dotc/core/SymDenotations.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala') diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 3566595f2..0b5e10220 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -210,6 +210,10 @@ object SymDenotations { /** Does this denotation have an annotation matching the given class symbol? */ final def hasAnnotation(cls: Symbol)(implicit ctx: Context) = dropOtherAnnotations(annotations, cls).nonEmpty + + /** Apply transform `f` to all annotations of this denotation */ + final def transformAnnotations(f: Annotation => Annotation)(implicit ctx: Context): Unit = + annotations = annotations.mapConserve(f) /** Optionally, the annotation matching the given class symbol */ final def getAnnotation(cls: Symbol)(implicit ctx: Context): Option[Annotation] = -- cgit v1.2.3