Fix: don't crash when local functions happen to share the name of a function with a special JVM name

This commit is contained in:
Chris Smowton
2022-06-14 19:33:47 +01:00
parent 837bef60fe
commit 3901f57550

View File

@@ -97,7 +97,7 @@ open class KotlinUsesExtractor(
fun getSpecialJvmName(f: IrFunction): String? {
if (specialFunctionShortNames.contains(f.name) && f is IrSimpleFunction) {
f.allOverridden(true).forEach { overriddenFunc ->
overriddenFunc.parentAsClass.fqNameWhenAvailable?.let { parentFqName ->
overriddenFunc.parentClassOrNull?.fqNameWhenAvailable?.let { parentFqName ->
specialFunctions[MethodKey(parentFqName, f.name)]?.let {
return it
}