@@ -6,6 +6,7 @@ import core._, core.Decorators._
66import util .NoSource .{file => NoSourceFile }
77import Contexts ._ , Flags ._ , Phases ._ , Trees ._ , Types ._ , Symbols ._
88import Names ._ , NameOps ._ , StdNames ._
9+ import transform .SymUtils ._
910
1011import scala .collection .{Set , mutable }
1112
@@ -151,9 +152,6 @@ object ExtractDependencies {
151152 def classNameAsString (sym : Symbol )(implicit ctx : Context ): String =
152153 sym.fullName.stripModuleClassSuffix.toString
153154
154- def isLocal (sym : Symbol )(implicit ctx : Context ): Boolean =
155- sym.ownersIterator.exists(_.isTerm)
156-
157155 /** Return the enclosing class or the module class if it's a module. */
158156 def enclOrModuleClass (dep : Symbol )(implicit ctx : Context ): Symbol =
159157 if (dep.is(ModuleVal )) dep.moduleClass else dep.enclosingClass
@@ -301,7 +299,7 @@ private class ExtractDependenciesCollector extends tpd.TreeTraverser { thisTreeT
301299 private def addInheritanceDependency (tree : Template )(implicit ctx : Context ): Unit =
302300 if (tree.parents.nonEmpty) {
303301 val depContext =
304- if (isLocal( tree.symbol.owner) ) LocalDependencyByInheritance
302+ if (tree.symbol.owner.isLocal ) LocalDependencyByInheritance
305303 else DependencyByInheritance
306304 val from = resolveDependencySource
307305 tree.parents.foreach { parent =>
0 commit comments