JVM_IR KT-48433 don't generate null check on 'this$0' parameter

This commit is contained in:
Dmitry Petrov
2021-08-26 16:35:54 +03:00
parent dd98f72fd7
commit 7df5ebf6ee
5 changed files with 27 additions and 0 deletions
@@ -328,6 +328,7 @@ class ExpressionCodegen(
irFunction.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA
private fun generateNonNullAssertion(param: IrValueParameter) {
if (param.origin == JvmLoweredDeclarationOrigin.FIELD_FOR_OUTER_THIS) return
val asmType = param.type.asmType
if (!param.type.unboxInlineClass().isNullable() && !isPrimitive(asmType)) {
mv.load(findLocalIndex(param.symbol), asmType)