Skip to content

Commit 1c69699

Browse files
committed
SI-9011 Speculative fix for CCE in Scala IDE
Based on the reported stack trace and what I know of Scala IDE, I've changed `InteractiveNamer#enterExistingSymbol` to be `DocDef` aware. I haven't provided a test as this was not minimized from Scala IDE.
1 parent d9f623d commit 1c69699

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/interactive/scala/tools/nsc/interactive/Global.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ trait InteractiveAnalyzer extends Analyzer {
7878
val owningInfo = sym.owner.info
7979
val existingDerivedSym = owningInfo.decl(sym.name.toTermName).filter(sym => sym.isSynthetic && sym.isMethod)
8080
existingDerivedSym.alternatives foreach (owningInfo.decls.unlink)
81-
enterImplicitWrapper(tree.asInstanceOf[ClassDef])
81+
val defTree = tree match {
82+
case dd: DocDef => dd.definition // See SI-9011, Scala IDE's presentation compiler incorporates ScalaDocGlobal with InterativeGlobal, so we have to unwrap DocDefs.
83+
case _ => tree
84+
}
85+
enterImplicitWrapper(defTree.asInstanceOf[ClassDef])
8286
}
8387
super.enterExistingSym(sym, tree)
8488
}

0 commit comments

Comments
 (0)