aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-04-22 13:15:11 +0200
committerMartin Odersky <odersky@gmail.com>2015-04-22 17:19:35 +0200
commit7e60221120015be2607947f2de55ca4984db7077 (patch)
treeec04ad69cb812a9fe3ceb29eb2f1bbc55d2491b9 /src/dotty/tools/dotc/core/SymDenotations.scala
parent158c9632e9138a91a47ce13386bce0ab41db434b (diff)
downloaddotty-7e60221120015be2607947f2de55ca4984db7077.tar.gz
dotty-7e60221120015be2607947f2de55ca4984db7077.tar.bz2
dotty-7e60221120015be2607947f2de55ca4984db7077.zip
Roll InstChecks into PostTyper
Move InstChecks functionality into PostTyper in order to save a separate traversal.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala4
1 files changed, 4 insertions, 0 deletions
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] =