diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-10-13 17:58:59 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-11-22 01:35:08 +0100 |
commit | 2d6a290d93e9a4e58cda443b93cd126ebee43be8 (patch) | |
tree | d42925814e37ec03457963462b928e3307b4eb31 /compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala | |
parent | 3693211aafb3253c0f4608c84c285f5572d5ad6a (diff) | |
download | dotty-2d6a290d93e9a4e58cda443b93cd126ebee43be8.tar.gz dotty-2d6a290d93e9a4e58cda443b93cd126ebee43be8.tar.bz2 dotty-2d6a290d93e9a4e58cda443b93cd126ebee43be8.zip |
ExtractDependencies: correctly record inheritance on type alias
This fix the test "Extracted source dependencies from public members"
which previously failed with:
Set('G, 'E) is not equal to Set('B, 'E) (DependencySpecification.scala:34)
`H` extends `G.T[Int]` which is an alias of `B`, so the
`topLevelInheritanceDepndencies` of `H` should contain `B`, this was not
the case before because we didn't dealias before looking for the
top-level class of the dependency, so we ended up with `G`, the
top-level class in which the alias `T` is contained.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala index 229e35360..fefa63f6f 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala @@ -200,7 +200,7 @@ private class ExtractDependenciesCollector(implicit val ctx: Context) extends tp addDependency(ref.symbol) usedTypeTraverser.traverse(ref.tpe) case t @ Template(_, parents, _, _) => - t.parents.foreach(p => addInheritanceDependency(p.tpe.typeSymbol)) + t.parents.foreach(p => addInheritanceDependency(p.tpe.classSymbol)) case _ => } traverseChildren(tree) |