Skip to content

Commit 2245ffd

Browse files
committed
Annotation#deferredSymAndTree: make sure symbol is valid in current run
1 parent 5b330f1 commit 2245ffd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/Annotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ object Annotations {
122122
private[this] var mySym: Symbol = _
123123

124124
override def symbol(implicit ctx: Context): Symbol = {
125-
if (mySym == null) {
125+
if (mySym == null || mySym.defRunId != ctx.runId) {
126126
mySym = symf(ctx)
127127
assert(mySym != null)
128128
}

0 commit comments

Comments
 (0)