Don't do full type parameters erasure in resultIsActuallyAny
The only case when erasure required is when type is a type parameter.
This commit is contained in:
committed by
Space Team
parent
8f2825506a
commit
593b326c80
+4
-2
@@ -5,7 +5,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.backend.jvm.codegen
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.ir.*
|
||||
import org.jetbrains.kotlin.backend.common.ir.getDefaultAdditionalStatementsFromInlinedBlock
|
||||
import org.jetbrains.kotlin.backend.common.ir.getNonDefaultAdditionalStatementsFromInlinedBlock
|
||||
import org.jetbrains.kotlin.backend.common.ir.getOriginalStatementsFromInlinedBlock
|
||||
import org.jetbrains.kotlin.backend.common.lower.BOUND_RECEIVER_PARAMETER
|
||||
import org.jetbrains.kotlin.backend.common.lower.LoweredStatementOrigins
|
||||
import org.jetbrains.kotlin.backend.jvm.*
|
||||
@@ -808,7 +810,7 @@ class ExpressionCodegen(
|
||||
index < 0 -> extensionReceiverParameter!!.type
|
||||
else -> valueParameters[index].type
|
||||
}
|
||||
if (!type.eraseTypeParameters().isKotlinResult()) return null
|
||||
if (!type.eraseIfTypeParameter().isKotlinResult()) return null
|
||||
// If there's a bridge, it will unbox `Result` along with transforming all other arguments.
|
||||
// Otherwise, we need to treat `Result` as boxed if it overrides a non-`Result` or boxed `Result` type.
|
||||
// TODO: if results of `needsResultArgumentUnboxing` for `overriddenSymbols` are inconsistent, the boxedness
|
||||
|
||||
Reference in New Issue
Block a user