From 6ab7c1da8987806e0e3cbc820781b6ef955c109b Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 23 Mar 2017 16:54:58 +0100 Subject: Revert "sbt.ExtractDependencies: avoid false dependencies" This reverts commit 57641b9c7447fa0a6f1f47352dffb4c56c560b6a. Using `Type#select` instead of `Type#member` turned out to not help at all in avoiding false dependencies, you can still get a symbol whose denotation does not reallyExists. A proper fix for this issue is contained in the next commit. --- compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/sbt') diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala index c392880c5..fefa63f6f 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala @@ -175,7 +175,7 @@ private class ExtractDependenciesCollector(implicit val ctx: Context) extends tp override def traverse(tree: Tree)(implicit ctx: Context): Unit = { tree match { case Import(expr, selectors) => - def lookupImported(name: Name) = expr.tpe.select(name).typeSymbol + def lookupImported(name: Name) = expr.tpe.member(name).symbol def addImported(name: Name) = { // importing a name means importing both a term and a type (if they exist) addDependency(lookupImported(name.toTermName)) -- cgit v1.2.3