Skip to content

Commit c77b7a7

Browse files
committed
Merge pull request scala#4205 from retronym/ticket/9011
SI-9011 Speculative fix for CCE in Scala IDE
2 parents faa34e8 + 1c69699 commit c77b7a7

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)