Skip to content

Commit

Permalink
erasure: fix where some type parameters were not properly applied
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Oct 13, 2022
1 parent 001101c commit 5a7f9b3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@ class Erasure(scalaVersion: Versions.Scala) {
scope
.lookup(other)
.collectFirst {
case (x: TypeAliasTree, s) =>
case (x: TypeAliasTree, _) =>
if (x.alias.typeName === other) QualifiedName.Any
else simplify(s, FillInTParams(x, s, tpe.targs, Empty).alias)
else {
val newTa = FillInTParams(x, scope, tpe.targs, Empty)
simplify(scope / newTa, newTa.alias)
}
case (x: ClassTree, _) => x.codePath
}
.getOrElse(other)
Expand Down

0 comments on commit 5a7f9b3

Please sign in to comment.