@@ -6,6 +6,7 @@ import core._, core.Decorators._
6
6
import util .NoSource .{file => NoSourceFile }
7
7
import Contexts ._ , Flags ._ , Phases ._ , Trees ._ , Types ._ , Symbols ._
8
8
import Names ._ , NameOps ._ , StdNames ._
9
+ import transform .SymUtils ._
9
10
10
11
import scala .collection .{Set , mutable }
11
12
@@ -151,9 +152,6 @@ object ExtractDependencies {
151
152
def classNameAsString (sym : Symbol )(implicit ctx : Context ): String =
152
153
sym.fullName.stripModuleClassSuffix.toString
153
154
154
- def isLocal (sym : Symbol )(implicit ctx : Context ): Boolean =
155
- sym.ownersIterator.exists(_.isTerm)
156
-
157
155
/** Return the enclosing class or the module class if it's a module. */
158
156
def enclOrModuleClass (dep : Symbol )(implicit ctx : Context ): Symbol =
159
157
if (dep.is(ModuleVal )) dep.moduleClass else dep.enclosingClass
@@ -301,7 +299,7 @@ private class ExtractDependenciesCollector extends tpd.TreeTraverser { thisTreeT
301
299
private def addInheritanceDependency (tree : Template )(implicit ctx : Context ): Unit =
302
300
if (tree.parents.nonEmpty) {
303
301
val depContext =
304
- if (isLocal( tree.symbol.owner) ) LocalDependencyByInheritance
302
+ if (tree.symbol.owner.isLocal ) LocalDependencyByInheritance
305
303
else DependencyByInheritance
306
304
val from = resolveDependencySource
307
305
tree.parents.foreach { parent =>
0 commit comments