diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/refinedIntTypesAnalysis.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/refinedIntTypesAnalysis.kt index 088a56b4284..8be5c2cd6fc 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/refinedIntTypesAnalysis.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/refinedIntTypesAnalysis.kt @@ -149,7 +149,7 @@ internal fun performRefinedTypeAnalysis(methodNode: MethodNode, thisName: String val current = Frame(basicFrames[insnIndex] ?: return@Array null) refinedVarFrames[insnIndex].expectedTypeByVarIndex.withIndex().filter { it.value != null }.forEach { - assert(current.getLocal(it.index)?.type == Type.INT_TYPE) { + assert(current.getLocal(it.index)?.type?.sort in ALL_INT_SORTS) { "int type expected, but ${current.getLocal(it.index)?.type} was found in basic frames" } @@ -181,6 +181,7 @@ private class MySourceInterpreter : SourceInterpreter() { } private val REFINED_INT_SORTS = setOf(Type.BOOLEAN, Type.CHAR, Type.BYTE, Type.SHORT) +private val ALL_INT_SORTS = REFINED_INT_SORTS + Type.INT private fun MethodNode.findContainingVariableFromTable(insn: AbstractInsnNode, varIndex: Int): LocalVariableNode? { val insnIndex = instructions.indexOf(insn)