@@ -2,12 +2,13 @@ package dotty.tools
2
2
package dotc
3
3
package core
4
4
5
- import Symbols ._ , Types ._ , Contexts ._ , Constants ._
6
- import dotty . tools . dotc . ast .tpd , tpd .*
5
+ import Symbols ._ , Types ._ , Contexts ._ , Constants ._ , Phases . *
6
+ import ast .tpd , tpd .*
7
7
import util .Spans .Span
8
8
import printing .{Showable , Printer }
9
9
import printing .Texts .Text
10
- import annotation .internal .sharable
10
+
11
+ import scala .annotation .internal .sharable
11
12
12
13
object Annotations {
13
14
@@ -87,7 +88,7 @@ object Annotations {
87
88
def sameAnnotation (that : Annotation )(using Context ): Boolean =
88
89
symbol == that.symbol && tree.sameTree(that.tree)
89
90
90
- def hasOneOfMetaAnnotation (metaSyms : Symbol * )(using Context ): Boolean =
91
+ def hasOneOfMetaAnnotation (metaSyms : Symbol * )(using Context ): Boolean = atPhaseNoLater(erasurePhase) {
91
92
def recTp (tp : Type ): Boolean = tp.dealiasKeepAnnots match
92
93
case AnnotatedType (parent, metaAnnot) => metaSyms.exists(metaAnnot.matches) || recTp(parent)
93
94
case _ => false
@@ -99,6 +100,7 @@ object Annotations {
99
100
case Typed (expr, _) => rec(expr)
100
101
case _ => false
101
102
metaSyms.exists(symbol.hasAnnotation) || rec(tree)
103
+ }
102
104
103
105
/** Operations for hash-consing, can be overridden */
104
106
def hash : Int = System .identityHashCode(this )
0 commit comments