Skip to content

Commit

Permalink
Fix importing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jan 4, 2024
1 parent 445bb7a commit b6e2373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ internal class PsiMapper(
var mapped = mapping?.fullDeobfuscatedName
val pkg = dollarName.substringBeforeLast(".")
mapped = mapped?.replace('/', '.')?.replace('$', '.')
if (ambiguousImports.contains(pkg)) {
ambiguousImports[pkg]!!.add(mapped ?: name)
if (resolved !is PsiPackage) {
ambiguousImports[pkg]?.add(mapped ?: name)
}
if (mapped == name || mapped == null) return

Expand Down

0 comments on commit b6e2373

Please sign in to comment.