diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/KCallableNamePropertyLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/KCallableNamePropertyLowering.kt index 76853ad85f3..fb812a78ca6 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/KCallableNamePropertyLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/KCallableNamePropertyLowering.kt @@ -55,7 +55,7 @@ private class KCallableNamePropertyTransformer(val lower: KCallableNamePropertyL (it as? IrSimpleFunction)?.correspondingProperty ?: it } val irClass = directMember.parent as? IrClass ?: return expression - if (irClass.isSubclassOf(lower.context.irBuiltIns.kCallableClass.owner)) return expression + if (!irClass.isSubclassOf(lower.context.irBuiltIns.kCallableClass.owner)) return expression val name = when (directMember) { is IrSimpleFunction -> directMember.name is IrProperty -> directMember.name diff --git a/compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt b/compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt index 2b61581b45e..211252d3587 100644 --- a/compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt +++ b/compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt @@ -1,4 +1,5 @@ -// IGNORE_BACKEND: JS_IR +// IGNORE_BACKEND: JVM_IR, JS_IR + fun box(): String { fun OK() {}