Skip to content

Commit a340323

Browse files
committed
Also clean annotation trees
Note: this might involve forcing annotations.
1 parent d474afa commit a340323

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ class InteractiveDriver(settings: List[String]) extends Driver {
181181

182182
private def cleanup(tree: tpd.Tree)(implicit ctx: Context): Unit = tree.foreachSubTree { t =>
183183
if (t.hasType) {
184-
if (t.symbol.exists && !t.symbol.isCompleted)
185-
t.symbol.info = UnspecifiedErrorType
184+
if (t.symbol.exists) {
185+
if (!t.symbol.isCompleted) t.symbol.info = UnspecifiedErrorType
186+
t.symbol.annotations.foreach(annot => cleanup(annot.tree))
187+
}
186188
}
187189
t.removeAllAttachments()
188190
}

0 commit comments

Comments
 (0)