aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-15 18:51:55 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:12:28 +0200
commitbef012d32127e3d256d0ce31e1a2a27f7277f8d8 (patch)
treecae40c2211cfece2bfb0312af732ddfaa47c1ac5 /src/dotty/tools/dotc/core/SymDenotations.scala
parentce9efda393055060a73509d1c10b8bdd9f2f0136 (diff)
downloaddotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.tar.gz
dotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.tar.bz2
dotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.zip
Move logic from InlineInfo to BodyAnnot
Now that we have BodyAnnot, InlineInfo can be eliminated.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 8a9e8494a..969d09c3e 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -298,6 +298,12 @@ object SymDenotations {
final def removeAnnotation(cls: Symbol)(implicit ctx: Context): Unit =
annotations = myAnnotations.filterNot(_ matches cls)
+ /** Remove any annotations with same class as `annot`, and add `annot` */
+ final def updateAnnotation(annot: Annotation)(implicit ctx: Context): Unit = {
+ removeAnnotation(annot.symbol)
+ addAnnotation(annot)
+ }
+
/** Add all given annotations to this symbol */
final def addAnnotations(annots: TraversableOnce[Annotation])(implicit ctx: Context): Unit =
annots.foreach(addAnnotation)