aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
index 13bcc14..0ad498b 100644
--- a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
+++ b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.resolve.BindingContext
+import org.jetbrains.kotlin.resolve.descriptorUtil.overriddenTreeAsSequence
import org.jetbrains.kotlin.synthetic.SyntheticJavaPropertyDescriptor
import org.jetbrains.kotlin.synthetic.SyntheticJavaPropertyDescriptor.Companion.propertyNameByGetMethodName
import java.util.*
@@ -150,7 +151,10 @@ internal class PsiMapper(
}
private fun map(expr: PsiElement, property: SyntheticJavaPropertyDescriptor) {
- val getter = property.getMethod.findPsi() as? PsiMethod ?: return
+ val getter = property.getMethod
+ .overriddenTreeAsSequence(false)
+ .firstNotNullOfOrNull { it.findPsi() }
+ as? PsiMethod ?: return
val mapping = findMapping(getter)
val mappedGetter = mapping?.deobfuscatedName ?: return
if (mappedGetter != getter.name) {