diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/Equals.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/Equals.kt index 211da1673fd..dfcb3cad97d 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/Equals.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/Equals.kt @@ -139,7 +139,12 @@ class TotalOrderEquals(operandType: Type) : IntrinsicMethod() { ): IrIntrinsicFunction = object : IrIntrinsicFunction(expression, signature, context, listOf(boxedType, boxedType)) { override fun genInvokeInstruction(v: InstructionAdapter) { - v.invokevirtual(boxedType.internalName, "equals", Type.getMethodDescriptor(Type.BOOLEAN_TYPE, AsmTypes.OBJECT_TYPE), false) + v.invokestatic( + IntrinsicMethods.INTRINSICS_CLASS_NAME, + "areEqual", + Type.getMethodDescriptor(Type.BOOLEAN_TYPE, AsmTypes.OBJECT_TYPE, AsmTypes.OBJECT_TYPE), + false + ) } } } diff --git a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt index 0333eda4c50..a930ab8fe66 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt @@ -1,5 +1,4 @@ // !LANGUAGE: -ThrowNpeOnExplicitEqualsForBoxedNull -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: test.kt diff --git a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt index ffc15cbfdd3..5fefcdab981 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_EXCEPTION_ON_EXPLICIT_EQUALS_FOR_BOXED_NULL // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt b/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt index a52b6c80b38..86cbc2162e2 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt +++ b/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt @@ -1,5 +1,4 @@ // !LANGUAGE: -ThrowNpeOnExplicitEqualsForBoxedNull -// IGNORE_BACKEND: JVM_IR // FILE: JavaClass.java public class JavaClass {