From 95fb597da07a60e42063f0588dd54a0b6f8d81ab Mon Sep 17 00:00:00 2001 From: pyos Date: Tue, 6 Oct 2020 16:54:11 +0200 Subject: [PATCH] PSI2IR / FIR2IR: bind FunctionN as receiver when suspend-converting This is more consistent with adapted references & allows skipping a temporary variable. --- .../backend/generators/AdapterGenerator.kt | 56 ++-- .../generators/ArgumentsGenerationUtils.kt | 78 ++---- ...endConversionOnArbitraryExpression.fir.txt | 254 +++++++++--------- ...suspendConversionOnArbitraryExpression.txt | 230 +++++++++------- 4 files changed, 310 insertions(+), 308 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt index 3feaf6645df..721a1134bf1 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt @@ -14,12 +14,10 @@ import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression import org.jetbrains.kotlin.fir.render import org.jetbrains.kotlin.fir.resolve.inference.* -import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol import org.jetbrains.kotlin.fir.types.ConeClassLikeType import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.coneType -import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.descriptors.WrappedSimpleFunctionDescriptor import org.jetbrains.kotlin.ir.descriptors.WrappedValueParameterDescriptor @@ -37,7 +35,6 @@ import org.jetbrains.kotlin.ir.types.isUnit import org.jetbrains.kotlin.ir.types.typeOrNull import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.utils.SmartList /** * A generator that converts callable references or arguments that needs an adapter in between. This covers: @@ -409,28 +406,17 @@ internal class AdapterGenerator( val invokeSymbol = findInvokeSymbol(expectedFunctionalType, argument) ?: return this val suspendConvertedType = expectedType.toIrType() as IrSimpleType - val returnType = suspendConvertedType.arguments.last().typeOrNull!! return argument.convertWithOffsets { startOffset, endOffset -> - val irAdapterFunction = createAdapterFunctionForArgument(startOffset, endOffset, suspendConvertedType) - // TODO: Should be able to reuse `this` if that is an immutable IrGetValue - val irArgumentValue = createTemporaryVariable(this, conversionScope).first - val irCall = createAdapteeCallForArgument(startOffset, endOffset, irAdapterFunction, invokeSymbol, irArgumentValue) - irAdapterFunction.body = irFactory.createBlockBody(startOffset, endOffset) { - if (returnType.isUnit()) { - statements.add(irCall) - } else { - statements.add(IrReturnImpl(startOffset, endOffset, irBuiltIns.nothingType, irAdapterFunction.symbol, irCall)) - } - } - - val statements = SmartList() - statements.add(irArgumentValue) - statements.add( - IrFunctionExpressionImpl( - startOffset, endOffset, suspendConvertedType, irAdapterFunction, IrStatementOrigin.SUSPEND_CONVERSION - ) + val irAdapterFunction = createAdapterFunctionForArgument(startOffset, endOffset, suspendConvertedType, type, invokeSymbol) + // TODO add a bound receiver property to IrFunctionExpressionImpl? + val irAdapterRef = IrFunctionReferenceImpl( + startOffset, endOffset, suspendConvertedType, irAdapterFunction.symbol, irAdapterFunction.typeParameters.size, + irAdapterFunction.valueParameters.size, null, IrStatementOrigin.SUSPEND_CONVERSION ) - IrBlockImpl(startOffset, endOffset, suspendConvertedType, IrStatementOrigin.SUSPEND_CONVERSION, statements) + IrBlockImpl(startOffset, endOffset, suspendConvertedType, IrStatementOrigin.SUSPEND_CONVERSION).apply { + statements.add(irAdapterFunction) + statements.add(irAdapterRef.apply { extensionReceiver = this@applySuspendConversionIfNeeded }) + } } } @@ -457,7 +443,9 @@ internal class AdapterGenerator( private fun createAdapterFunctionForArgument( startOffset: Int, endOffset: Int, - type: IrSimpleType + type: IrSimpleType, + argumentType: IrType, + invokeSymbol: IrSimpleFunctionSymbol ): IrSimpleFunction { val returnType = type.arguments.last().typeOrNull!! val parameterTypes = type.arguments.dropLast(1).map { it.typeOrNull!! } @@ -483,6 +471,13 @@ internal class AdapterGenerator( ).also { irAdapterFunction -> adapterFunctionDescriptor.bind(irAdapterFunction) symbolTable.enterScope(irAdapterFunction) + irAdapterFunction.extensionReceiverParameter = createAdapterParameter( + irAdapterFunction, + Name.identifier("callee"), + -1, + argumentType, + IrDeclarationOrigin.ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION + ) irAdapterFunction.valueParameters += parameterTypes.mapIndexed { index, parameterType -> createAdapterParameter( irAdapterFunction, @@ -492,6 +487,14 @@ internal class AdapterGenerator( IrDeclarationOrigin.ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION ) } + irAdapterFunction.body = irFactory.createBlockBody(startOffset, endOffset) { + val irCall = createAdapteeCallForArgument(startOffset, endOffset, irAdapterFunction, invokeSymbol) + if (returnType.isUnit()) { + statements.add(irCall) + } else { + statements.add(IrReturnImpl(startOffset, endOffset, irBuiltIns.nothingType, irAdapterFunction.symbol, irCall)) + } + } symbolTable.leaveScope(irAdapterFunction) irAdapterFunction.parent = conversionScope.parent()!! } @@ -502,8 +505,7 @@ internal class AdapterGenerator( startOffset: Int, endOffset: Int, adapterFunction: IrFunction, - invokeSymbol: IrSimpleFunctionSymbol, - irCapturedValue: IrValueDeclaration + invokeSymbol: IrSimpleFunctionSymbol ): IrExpression { val irCall = IrCallImpl( startOffset, endOffset, @@ -512,7 +514,7 @@ internal class AdapterGenerator( typeArgumentsCount = 0, valueArgumentsCount = adapterFunction.valueParameters.size ) - irCall.dispatchReceiver = irCapturedValue.toIrGetValue(startOffset, endOffset) + irCall.dispatchReceiver = adapterFunction.extensionReceiverParameter!!.toIrGetValue(startOffset, endOffset) for (irAdapterParameter in adapterFunction.valueParameters) { irCall.putValueArgument(irAdapterParameter.index, irAdapterParameter.toIrGetValue(startOffset, endOffset)) } diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt index f468f7ca61a..5fa26c4a8fb 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt @@ -23,19 +23,16 @@ import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.impl.SyntheticFieldDescriptor import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor import org.jetbrains.kotlin.incremental.components.NoLookupLocation -import org.jetbrains.kotlin.ir.builders.irBlock import org.jetbrains.kotlin.ir.builders.irBlockBody import org.jetbrains.kotlin.ir.builders.irGet -import org.jetbrains.kotlin.ir.builders.irTemporary import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction +import org.jetbrains.kotlin.ir.declarations.IrValueParameter import org.jetbrains.kotlin.ir.descriptors.WrappedSimpleFunctionDescriptor import org.jetbrains.kotlin.ir.descriptors.WrappedValueParameterDescriptor import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.impl.* -import org.jetbrains.kotlin.ir.symbols.IrValueSymbol import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.isImmutable import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.psi.KtExpression @@ -338,39 +335,22 @@ private fun StatementGenerator.applySuspendConversionForValueArgumentIfRequired( val valueParameterType = if (valueParameter.isVararg) valueParameter.varargElementType!! else valueParameter.type - return wrapInSuspendConversion(expression, suspendConversionType, valueParameterType) -} - -private fun StatementGenerator.wrapInSuspendConversion( - expression: IrExpression, - funType: KotlinType, - suspendFunType: KotlinType -): IrExpression { - val irFunType = funType.toIrType() - val irSuspendFunType = suspendFunType.toIrType() - - return irBlock( - expression.startOffset, expression.endOffset, - IrStatementOrigin.SUSPEND_CONVERSION, - irSuspendFunType - ) { - val irArgumentValue = - if (expression is IrGetValue && expression.symbol.owner.isImmutable) - expression.symbol.owner - else - irTemporary(expression, typeHint = funType, irType = irFunType) - +IrFunctionExpressionImpl( - startOffset, endOffset, irSuspendFunType, - createFunctionForSuspendConversion(startOffset, endOffset, irArgumentValue.symbol, funType, suspendFunType), - IrStatementOrigin.SUSPEND_CONVERSION + val irSuspendFunType = valueParameterType.toIrType() + return IrBlockImpl(expression.startOffset, expression.endOffset, irSuspendFunType, IrStatementOrigin.SUSPEND_CONVERSION).apply { + val irAdapterFunction = createFunctionForSuspendConversion(startOffset, endOffset, suspendConversionType, valueParameterType) + // TODO add a bound receiver property to IrFunctionExpressionImpl? + val irAdapterRef = IrFunctionReferenceImpl( + startOffset, endOffset, irSuspendFunType, irAdapterFunction.symbol, irAdapterFunction.typeParameters.size, + irAdapterFunction.valueParameters.size, null, IrStatementOrigin.SUSPEND_CONVERSION ) + statements.add(irAdapterFunction) + statements.add(irAdapterRef.apply { extensionReceiver = expression }) } } private fun StatementGenerator.createFunctionForSuspendConversion( startOffset: Int, endOffset: Int, - irCapturedValueSymbol: IrValueSymbol, funType: KotlinType, suspendFunType: KotlinType ): IrSimpleFunction { @@ -399,28 +379,24 @@ private fun StatementGenerator.createFunctionForSuspendConversion( context.symbolTable.enterScope(adapterFunctionDescriptor) + fun createValueParameter(name: String, index: Int, type: IrType): IrValueParameter { + val descriptor = WrappedValueParameterDescriptor() + return context.symbolTable.declareValueParameter( + startOffset, endOffset, IrDeclarationOrigin.ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION, descriptor, type + ) { + context.irFactory.createValueParameter( + startOffset, endOffset, IrDeclarationOrigin.ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION, + it, Name.identifier(name), index, type, varargElementType = null, isCrossinline = false, isNoinline = false + ) + }.also { + descriptor.bind(it) + } + } + + irAdapterFun.extensionReceiverParameter = createValueParameter("callee", -1, funType.toIrType()) irAdapterFun.valueParameters = suspendFunType.arguments .take(suspendFunType.arguments.size - 1) - .mapIndexed { index, typeProjection -> - val adaptedParameterDescriptor = WrappedValueParameterDescriptor() - val irParameterType = typeProjection.type.toIrType() - context.symbolTable.declareValueParameter( - startOffset, endOffset, IrDeclarationOrigin.ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION, - adaptedParameterDescriptor, - irParameterType, - ) { irValueParameterSymbol -> - context.irFactory.createValueParameter( - startOffset, endOffset, IrDeclarationOrigin.ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION, - irValueParameterSymbol, - Name.identifier("p$index"), - index, - irParameterType, - varargElementType = null, isCrossinline = false, isNoinline = false, isAssignable = false - ) - }.also { - adaptedParameterDescriptor.bind(it) - } - } + .mapIndexed { index, typeProjection -> createValueParameter("p$index", index, typeProjection.type.toIrType()) } val valueArgumentsCount = irAdapterFun.valueParameters.size val invokeDescriptor = funType.memberScope @@ -437,7 +413,7 @@ private fun StatementGenerator.createFunctionForSuspendConversion( valueArgumentsCount = valueArgumentsCount ) - irAdapteeCall.dispatchReceiver = irGet(irCapturedValueSymbol.owner) + irAdapteeCall.dispatchReceiver = irGet(irAdapterFun.extensionReceiverParameter!!) this@createFunctionForSuspendConversion.context .callToSubstitutedDescriptorMap[irAdapteeCall] = invokeDescriptor diff --git a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.txt b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.txt index 793f923c387..e80e8af23f0 100644 --- a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.txt +++ b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.txt @@ -29,126 +29,126 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt BLOCK_BODY CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Function0 [val] - GET_VAR 'fn: kotlin.Function0 declared in .testSimple' type=kotlin.Function0 origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_0: kotlin.Function0 [val] declared in .testSimple' type=kotlin.Function0 origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSimple.suspendConversion' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (): kotlin.Unit [suspend] declared in .testSimple' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function0 declared in .testSimple' type=kotlin.Function0 origin=null FUN name:testSimpleNonVal visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Function0 [val] - CALL 'public final fun produceFun (): kotlin.Function0 declared in ' type=kotlin.Function0 origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_1: kotlin.Function0 [val] declared in .testSimpleNonVal' type=kotlin.Function0 origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSimpleNonVal.suspendConversion' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (): kotlin.Unit [suspend] declared in .testSimpleNonVal' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: CALL 'public final fun produceFun (): kotlin.Function0 declared in ' type=kotlin.Function0 origin=null FUN name:testExtAsExt visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExt (sfn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] - GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_2: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] declared in .testExtAsExt' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsExt.suspendConversion' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt.suspendConversion' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsExt.suspendConversion' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsExt' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testExtAsSimple visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendArg (sfn: kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] - GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimple' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_3: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] declared in .testExtAsSimple' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsSimple.suspendConversion' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimple.suspendConversion' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsSimple.suspendConversion' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsSimple' type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimple' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testSimpleAsExt visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExt (sfn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Function1 [val] - GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExt' type=kotlin.Function1 origin=null - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_4: kotlin.Function1 [val] declared in .testSimpleAsExt' type=kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsExt.suspendConversion' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1 declared in .testSimpleAsExt.suspendConversion' type=kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsExt.suspendConversion' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testSimpleAsExt' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExt' type=kotlin.Function1 origin=null FUN name:testSimpleAsSimpleT visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Function1 [val] - GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsSimpleT' type=kotlin.Function1 origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_5: kotlin.Function1 [val] declared in .testSimpleAsSimpleT' type=kotlin.Function1 origin=null - p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testSimpleAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1 declared in .testSimpleAsSimpleT.suspendConversion' type=kotlin.Function1 origin=null + p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testSimpleAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendArgT): kotlin.Unit [suspend] declared in .testSimpleAsSimpleT' type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsSimpleT' type=kotlin.Function1 origin=null FUN name:testSimpleAsExtT visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Function1 [val] - GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExtT' type=kotlin.Function1 origin=null - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_6: kotlin.Function1 [val] declared in .testSimpleAsExtT' type=kotlin.Function1 origin=null - p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testSimpleAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1 declared in .testSimpleAsExtT.suspendConversion' type=kotlin.Function1 origin=null + p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testSimpleAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testSimpleAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExtT' type=kotlin.Function1 origin=null FUN name:testExtAsSimpleT visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] - GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimpleT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_7: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] declared in .testExtAsSimpleT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testExtAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1, p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimpleT.suspendConversion' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testExtAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendArgT): kotlin.Unit [suspend] declared in .testExtAsSimpleT' type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimpleT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testExtAsExtT visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] - GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_8: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 [val] declared in .testExtAsExtT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testExtAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT.suspendConversion' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testExtAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testExtAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testSimpleSAsSimpleT visibility:public modality:FINAL (fn:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> @@ -156,15 +156,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testSimpleSAsSimpleT sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> [val] - GET_VAR 'fn: kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> declared in .testSimpleSAsSimpleT' type=kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_9: kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> [val] declared in .testSimpleSAsSimpleT' type=kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testSimpleSAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit>, p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> declared in .testSimpleSAsSimpleT.suspendConversion' type=kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testSimpleSAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendArgT): kotlin.Unit [suspend] declared in .testSimpleSAsSimpleT' type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> declared in .testSimpleSAsSimpleT' type=kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> origin=null FUN name:testSimpleSAsExtT visibility:public modality:FINAL (fn:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> @@ -172,15 +172,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testSimpleSAsExtT sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> [val] - GET_VAR 'fn: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_10: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> [val] declared in .testSimpleSAsExtT' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testSimpleSAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit>, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT.suspendConversion' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testSimpleSAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testSimpleSAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null FUN name:testExtSAsSimpleT visibility:public modality:FINAL (fn:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> @@ -188,15 +188,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testExtSAsSimpleT sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> [val] - GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> declared in .testExtSAsSimpleT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_11: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> [val] declared in .testExtSAsSimpleT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testExtSAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit>, p0:T of .useSuspendArgT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendArgT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> declared in .testExtSAsSimpleT.suspendConversion' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: T of .useSuspendArgT declared in .testExtSAsSimpleT.suspendConversion' type=T of .useSuspendArgT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendArgT): kotlin.Unit [suspend] declared in .testExtSAsSimpleT' type=kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> declared in .testExtSAsSimpleT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> origin=null FUN name:testExtSAsExtT visibility:public modality:FINAL (fn:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> @@ -204,15 +204,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testExtSAsExtT sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> [val] - GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> (p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_12: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> [val] declared in .testExtSAsExtT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testExtSAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit>, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT.suspendConversion' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testExtSAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testExtSAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT' type=@[ExtensionFunctionType] @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null FUN name:testSmartCastWithSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY @@ -221,14 +221,14 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt GET_VAR 'a: kotlin.Any declared in .testSmartCastWithSuspendConversion' type=kotlin.Any origin=null CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Function0 [val] - TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSmartCastWithSuspendConversion.suspendConversion' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (): kotlin.Unit [suspend] declared in .testSmartCastWithSuspendConversion' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Any declared in .testSmartCastWithSuspendConversion' type=kotlin.Any origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_13: kotlin.Function0 [val] declared in .testSmartCastWithSuspendConversion' type=kotlin.Function0 origin=null FUN name:testSmartCastOnVarWithSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY @@ -239,14 +239,14 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt GET_VAR 'var b: kotlin.Any [var] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlin.Function0 [val] - TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSmartCastOnVarWithSuspendConversion.suspendConversion' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion (): kotlin.Unit [suspend] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 GET_VAR 'var b: kotlin.Any [var] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_14: kotlin.Function0 [val] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.Function0 origin=null FUN name:testSmartCastVsSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.txt b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.txt index 7fac3e36c9b..e779c2032d2 100644 --- a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.txt +++ b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.txt @@ -29,110 +29,126 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt BLOCK_BODY CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: kotlin.Function0 declared in .testSimple' type=kotlin.Function0 origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSimple.suspendConversion0' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (): kotlin.Unit [suspend] declared in .testSimple' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function0 declared in .testSimple' type=kotlin.Function0 origin=null FUN name:testSimpleNonVal visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Function0 [val] - CALL 'public final fun produceFun (): kotlin.Function0 declared in ' type=kotlin.Function0 origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_0: kotlin.Function0 [val] declared in .testSimpleNonVal' type=kotlin.Function0 origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSimpleNonVal.suspendConversion0' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (): kotlin.Unit [suspend] declared in .testSimpleNonVal' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: CALL 'public final fun produceFun (): kotlin.Function0 declared in ' type=kotlin.Function0 origin=null FUN name:testExtAsExt visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExt (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt' type=@[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsExt.suspendConversion0' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt.suspendConversion0' type=@[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsExt.suspendConversion0' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsExt' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testExtAsSimple visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendArg (sfn: kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN_EXPR type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimple' type=@[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsSimple.suspendConversion0' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1 declared in .testExtAsSimple.suspendConversion0' type=kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsSimple.suspendConversion0' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsSimple' type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimple' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testSimpleAsExt visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExt (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExt' type=kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsExt.suspendConversion0' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1 declared in .testSimpleAsExt.suspendConversion0' type=@[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsExt.suspendConversion0' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testSimpleAsExt' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExt' type=kotlin.Function1 origin=null FUN name:testSimpleAsSimpleT visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN_EXPR type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsSimpleT' type=kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsSimpleT.suspendConversion0' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1 declared in .testSimpleAsSimpleT.suspendConversion0' type=kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsSimpleT.suspendConversion0' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testSimpleAsSimpleT' type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsSimpleT' type=kotlin.Function1 origin=null FUN name:testSimpleAsExtT visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExtT' type=kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsExtT.suspendConversion0' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1 declared in .testSimpleAsExtT.suspendConversion0' type=@[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsExtT.suspendConversion0' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testSimpleAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExtT' type=kotlin.Function1 origin=null FUN name:testExtAsSimpleT visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN_EXPR type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimpleT' type=@[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsSimpleT.suspendConversion0' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1 declared in .testExtAsSimpleT.suspendConversion0' type=kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsSimpleT.suspendConversion0' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsSimpleT' type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsSimpleT' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testExtAsExtT visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT' type=@[ExtensionFunctionType] kotlin.Function1 origin=null - p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsExtT.suspendConversion0' type=kotlin.Int origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1 + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT.suspendConversion0' type=@[ExtensionFunctionType] kotlin.Function1 origin=null + p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsExtT.suspendConversion0' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testSimpleSAsSimpleT visibility:public modality:FINAL (fn:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> @@ -140,13 +156,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testSimpleSAsSimpleT sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.testSimpleSAsSimpleT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN_EXPR type=kotlin.coroutines.SuspendFunction1.testSimpleSAsSimpleT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:S of .testSimpleSAsSimpleT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testSimpleSAsSimpleT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> declared in .testSimpleSAsSimpleT' type=kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: S of .testSimpleSAsSimpleT declared in .testSimpleSAsSimpleT.suspendConversion0' type=S of .testSimpleSAsSimpleT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit>, p0:S of .testSimpleSAsSimpleT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testSimpleSAsSimpleT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> declared in .testSimpleSAsSimpleT.suspendConversion0' type=kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: S of .testSimpleSAsSimpleT declared in .testSimpleSAsSimpleT.suspendConversion0' type=S of .testSimpleSAsSimpleT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: S of .testSimpleSAsSimpleT): kotlin.Unit [suspend] declared in .testSimpleSAsSimpleT' type=kotlin.coroutines.SuspendFunction1.testSimpleSAsSimpleT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> declared in .testSimpleSAsSimpleT' type=kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit> origin=null FUN name:testSimpleSAsExtT visibility:public modality:FINAL (fn:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> @@ -154,13 +172,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testSimpleSAsExtT sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.testSimpleSAsExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.testSimpleSAsExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:S of .testSimpleSAsExtT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testSimpleSAsExtT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: S of .testSimpleSAsExtT declared in .testSimpleSAsExtT.suspendConversion0' type=S of .testSimpleSAsExtT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1.testSimpleSAsExtT, kotlin.Unit>, p0:S of .testSimpleSAsExtT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testSimpleSAsExtT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT.suspendConversion0' type=@[ExtensionFunctionType] kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: S of .testSimpleSAsExtT declared in .testSimpleSAsExtT.suspendConversion0' type=S of .testSimpleSAsExtT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: S of .testSimpleSAsExtT): kotlin.Unit [suspend] declared in .testSimpleSAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.testSimpleSAsExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null FUN name:testExtSAsSimpleT visibility:public modality:FINAL (fn:@[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> @@ -168,13 +188,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendArgT (sfn: kotlin.coroutines.SuspendFunction1.useSuspendArgT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testExtSAsSimpleT sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.testExtSAsSimpleT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN_EXPR type=kotlin.coroutines.SuspendFunction1.testExtSAsSimpleT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:S of .testExtSAsSimpleT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testExtSAsSimpleT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> declared in .testExtSAsSimpleT' type=@[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: S of .testExtSAsSimpleT declared in .testExtSAsSimpleT.suspendConversion0' type=S of .testExtSAsSimpleT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function1.testExtSAsSimpleT, kotlin.Unit>, p0:S of .testExtSAsSimpleT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testExtSAsSimpleT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> declared in .testExtSAsSimpleT.suspendConversion0' type=kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: S of .testExtSAsSimpleT declared in .testExtSAsSimpleT.suspendConversion0' type=S of .testExtSAsSimpleT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: S of .testExtSAsSimpleT): kotlin.Unit [suspend] declared in .testExtSAsSimpleT' type=kotlin.coroutines.SuspendFunction1.testExtSAsSimpleT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> declared in .testExtSAsSimpleT' type=@[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit> origin=null FUN name:testExtSAsExtT visibility:public modality:FINAL (fn:@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> @@ -182,13 +204,15 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testExtSAsExtT sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.testExtSAsExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.testExtSAsExtT, kotlin.Unit> origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> (p0:S of .testExtSAsExtT) returnType:kotlin.Unit [suspend] - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testExtSAsExtT - BLOCK_BODY - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null - $this: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT' type=@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null - p1: GET_VAR 'p0: S of .testExtSAsExtT declared in .testExtSAsExtT.suspendConversion0' type=S of .testExtSAsExtT origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit>, p0:S of .testExtSAsExtT) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:S of .testExtSAsExtT + BLOCK_BODY + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT.suspendConversion0' type=@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null + p1: GET_VAR 'p0: S of .testExtSAsExtT declared in .testExtSAsExtT.suspendConversion0' type=S of .testExtSAsExtT origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (p0: S of .testExtSAsExtT): kotlin.Unit [suspend] declared in .testExtSAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.testExtSAsExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT' type=@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null FUN name:testSmartCastWithSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY @@ -197,12 +221,13 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt GET_VAR 'a: kotlin.Any declared in .testSmartCastWithSuspendConversion' type=kotlin.Any origin=null CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 - GET_VAR 'a: kotlin.Any declared in .testSmartCastWithSuspendConversion' type=kotlin.Any origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSmartCastWithSuspendConversion.suspendConversion0' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (): kotlin.Unit [suspend] declared in .testSmartCastWithSuspendConversion' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'a: kotlin.Any declared in .testSmartCastWithSuspendConversion' type=kotlin.Any origin=null FUN name:testSmartCastOnVarWithSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY @@ -213,14 +238,13 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt GET_VAR 'var b: kotlin.Any [var] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null sfn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Function0 [val] - TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 - GET_VAR 'var b: kotlin.Any [var] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null - FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION - FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] - BLOCK_BODY - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_1: kotlin.Function0 [val] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.Function0 origin=null + FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function0) returnType:kotlin.Unit [suspend] + $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0 + BLOCK_BODY + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + $this: GET_VAR 'callee: kotlin.Function0 declared in .testSmartCastOnVarWithSuspendConversion.suspendConversion0' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun suspendConversion0 (): kotlin.Unit [suspend] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.coroutines.SuspendFunction0 origin=SUSPEND_CONVERSION reflectionTarget=null + $receiver: GET_VAR 'var b: kotlin.Any [var] declared in .testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null FUN name:testSmartCastVsSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY