Skip to content

Commit cb2e52f

Browse files
committed
Don't use matchSymbol in SourceTree
Simple comparison is enough, since we no longer have to deal with late-loaded symbols.
1 parent e23d6ce commit cb2e52f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import ast.tpd
88
import core._, core.Decorators.{sourcePos => _, _}
99
import Contexts._, NameOps._, Symbols._
1010
import util._, util.Positions._
11-
import Interactive.matchSymbol
1211

1312
/** A typechecked named `tree` coming from `source` */
1413
case class SourceTree(tree: tpd.NameTree, source: SourceFile) {
@@ -48,7 +47,7 @@ object SourceTree {
4847
def sourceTreeOfClass(tree: tpd.Tree): Option[SourceTree] = tree match {
4948
case PackageDef(_, stats) =>
5049
stats.flatMap(sourceTreeOfClass).headOption
51-
case tree: tpd.TypeDef if matchSymbol(tree, sym, includeOverridden = false) =>
50+
case tree: tpd.TypeDef if tree.symbol == sym =>
5251
val sourceFile = new SourceFile(sym.sourceFile, Codec.UTF8)
5352
Some(SourceTree(tree, sourceFile))
5453
case _ => None

0 commit comments

Comments
 (0)