aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorJosiah Glosson <soujournme@gmail.com>2024-04-25 03:25:44 -0500
committerGitHub <noreply@github.com>2024-04-25 10:25:44 +0200
commit78d264552f201c388ab833617d4d3ff7ed67eee8 (patch)
tree1424a01c5ff83823de7ff2844f080158dd89993a /src/main/kotlin
parent9bb86792bf4740b6650ccd40b0d47318cf1a3929 (diff)
downloadRemap-78d264552f201c388ab833617d4d3ff7ed67eee8.tar.gz
Remap-78d264552f201c388ab833617d4d3ff7ed67eee8.tar.bz2
Remap-78d264552f201c388ab833617d4d3ff7ed67eee8.zip
Fix remapMixinTarget not supporting NEW (#19)
Fixes #18
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
index 5dba364..f0b8b6b 100644
--- a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
+++ b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
@@ -531,14 +531,11 @@ internal class PsiMapper(
}
private fun remapMixinTarget(target: String): String {
- return if (target.contains(':') || target.contains('(')) {
- remapFullyQualifiedMethodOrField(target)
- } else {
- if (target[0] == 'L') {
- remapInternalType(target)
- } else {
- remapInternalType("L$target;").drop(1).dropLast(1)
- }
+ return when {
+ target.startsWith('(') -> remapMethodDesc(target)
+ target.contains(':') || target.contains('(') -> remapFullyQualifiedMethodOrField(target)
+ target[0] == 'L' -> remapInternalType(target)
+ else -> remapInternalType("L$target;").drop(1).dropLast(1)
}
}