We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f963bc2 commit 5b88356Copy full SHA for 5b88356
compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala
@@ -190,6 +190,12 @@ class InteractiveDriver(settings: List[String]) extends Driver {
190
if (t.symbol.exists && t.hasType) {
191
if (!t.symbol.isCompleted) t.symbol.info = UnspecifiedErrorType
192
t.symbol.annotations.foreach { annot =>
193
+ /* In some cases annotations are are used on themself (possibly larger cycles).
194
+ * This is the case with the java.lang.annotation.Target annotation, would end
195
+ * in an infinite loop while cleaning. The `seen` is added to ensure that those
196
+ * trees are not cleand twice.
197
+ * TODO: Find a less expensive way to check for those cycles.
198
+ */
199
if (!seen(annot.tree))
200
cleanupTree(annot.tree)
201
}
0 commit comments