Skip to content

Commit 3901f57

Browse files
committed
Fix: don't crash when local functions happen to share the name of a function with a special JVM name
1 parent 837bef6 commit 3901f57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ open class KotlinUsesExtractor(
9797
fun getSpecialJvmName(f: IrFunction): String? {
9898
if (specialFunctionShortNames.contains(f.name) && f is IrSimpleFunction) {
9999
f.allOverridden(true).forEach { overriddenFunc ->
100-
overriddenFunc.parentAsClass.fqNameWhenAvailable?.let { parentFqName ->
100+
overriddenFunc.parentClassOrNull?.fqNameWhenAvailable?.let { parentFqName ->
101101
specialFunctions[MethodKey(parentFqName, f.name)]?.let {
102102
return it
103103
}

0 commit comments

Comments
 (0)