diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/mapping/MethodSignatureMapper.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/mapping/MethodSignatureMapper.kt index 57948b13ae9..c6cb50a8e87 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/mapping/MethodSignatureMapper.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/mapping/MethodSignatureMapper.kt @@ -398,12 +398,7 @@ class MethodSignatureMapper(private val context: JvmBackendContext, private val // TODO get rid of 'caller' argument fun mapToCallableMethod(expression: IrCall, caller: IrFunction?): IrCallableMethod { val callee = expression.symbol.owner - val calleeParent = expression.superQualifierSymbol?.owner - ?: expression.dispatchReceiver?.type?.classOrNull?.owner?.let { - // Calling Object class methods on interfaces is permitted, but they're not interface methods. - if (it.isJvmInterface && callee.isMethodOfAny()) context.irBuiltIns.anyClass.owner else it - } - ?: callee.parentAsClass // Static call or type parameter + val calleeParent = expression.superQualifierSymbol?.owner ?: callee.parentAsClass val owner = typeMapper.mapOwner(calleeParent) val isInterface = calleeParent.isJvmInterface diff --git a/compiler/testData/codegen/box/controlStructures/forInIterator/uintIterator.kt b/compiler/testData/codegen/box/controlStructures/forInIterator/uintIterator.kt index e22953b4698..183b1291ef1 100644 --- a/compiler/testData/codegen/box/controlStructures/forInIterator/uintIterator.kt +++ b/compiler/testData/codegen/box/controlStructures/forInIterator/uintIterator.kt @@ -20,8 +20,10 @@ fun box(): String { // CHECK_BYTECODE_TEXT // JVM_IR_TEMPLATES -// 0 java/util/Iterator.hasNext \(\)Z +// 1 java/util/Iterator.hasNext \(\)Z // 0 java/util/Iterator.next \(\)Ljava/lang/Object; -// 1 MyUIntIterator.hasNext \(\)Z +// 0 MyUIntIterator.next \(\)Ljava/lang/Object; +// 0 MyUIntIterator.hasNext \(\)Z // 1 public synthetic bridge next\(\)Ljava/lang/Object; // 2 MyUIntIterator.next-pVg5ArA \(\)I +// 0 INVOKEVIRTUAL kotlin/UInt.unbox-impl \(\)I \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/serializable/multipleTopLevelFunRefs.kt b/compiler/testData/codegen/box/invokedynamic/serializable/multipleTopLevelFunRefs.kt index e9fece2ae43..bfce347d461 100644 --- a/compiler/testData/codegen/box/invokedynamic/serializable/multipleTopLevelFunRefs.kt +++ b/compiler/testData/codegen/box/invokedynamic/serializable/multipleTopLevelFunRefs.kt @@ -10,7 +10,7 @@ // JVM_IR_TEMPLATES // 12 java/lang/invoke/LambdaMetafactory // 1 (LOOKUP|TABLE)SWITCH -// 24 java/lang/String\.equals +// 4 java/lang/String\.equals // FILE: multipleTopLevelFunRefs.kt import java.io.*