Skip to content

Commit

Permalink
bugfix when generating scala imports: consider type parameter names w…
Browse files Browse the repository at this point in the history
…hen inside a class
  • Loading branch information
oyvindberg committed Dec 28, 2021
1 parent f6a7e28 commit 14a68c4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,15 @@ object ShortenNames {
case c: ClassTree => c.ctors.exists(_.params.exists(_.name === shortName))
case _ => false
}
def tparamsClash = x match {
case cls: ClassTree => cls.tparams.exists(_.name === shortName)
case _ => false
}

(x.name === shortName && x.codePath =/= longName) ||
among(x.index, longName, methodsAreConflict) ||
amongParents(scope, parentsResolver, x, longName, methodsAreConflict) ||
tparamsClash ||
ctorClash

case x: PackageTree =>
Expand Down

0 comments on commit 14a68c4

Please sign in to comment.