diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt index ad2274e51e0..1241edbed7e 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt @@ -867,8 +867,11 @@ open class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransform } val secondResult = augmentedArraySetCall.assignCall.transformSingle(transformer, ResolutionMode.ContextIndependent) - val firstSucceed = firstCalls.all { it.typeRef !is FirErrorTypeRef } - val secondSucceed = secondCalls.all { it.typeRef !is FirErrorTypeRef } + fun isSuccessful(functionCall: FirFunctionCall): Boolean = + functionCall.typeRef !is FirErrorTypeRef && functionCall.calleeReference is FirResolvedNamedReference + + val firstSucceed = firstCalls.all(::isSuccessful) + val secondSucceed = secondCalls.all(::isSuccessful) val result: FirStatement = when { firstSucceed && secondSucceed -> { diff --git a/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.fir.kt b/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.fir.kt new file mode 100644 index 00000000000..f9b72970cea --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.fir.kt @@ -0,0 +1,18 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +fun interface IFoo { + fun foo(i: Int) +} + +fun interface IFoo2 : IFoo + +object A + +operator fun A.get(i: IFoo) = 1 +operator fun A.set(i: IFoo, newValue: Int) {} + +fun withVararg(vararg xs: Int) = 42 + +fun test1() { + A[::withVararg] += 1 +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.kt b/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.kt index 821c47c5809..c012456ffbe 100644 --- a/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.kt +++ b/compiler/testData/diagnostics/tests/callableReference/compatibilityResolveWithVarargAndOperatorCall.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_PARAMETER fun interface IFoo { diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt index 006149d17ce..dcd7b5368ec 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt @@ -20,7 +20,7 @@ object MismatchingTypes { fun testMismatchingTypes() { ++MismatchingTypes[0] MismatchingTypes[0]++ - MismatchingTypes[0] += 1 + MismatchingTypes[0] += 1 } object MismatchingArities1 { @@ -36,10 +36,10 @@ object MismatchingArities2 { fun testMismatchingArities() { ++MismatchingArities1[0] MismatchingArities1[0]++ - MismatchingArities1[0] += 1 + MismatchingArities1[0] += 1 ++MismatchingArities2[0] MismatchingArities2[0]++ - MismatchingArities2[0] += 1 + MismatchingArities2[0] += 1 } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt index e5e4428a590..16b3427c296 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt @@ -44,19 +44,11 @@ fun withVararg(vararg xs: Int): Int { } fun test1() { - { // BLOCK - val <>: A = A - val <>: KFunction1 = ::withVararg - error("") /* ErrorCallExpression */<>; error("") /* ErrorCallExpression */<>; .plus(other = 1); - } + error("") /* ErrorCallExpression */ } fun test2() { - { // BLOCK - val <>: B = B - val <>: KFunction1 = ::withVararg - error("") /* ErrorCallExpression */<>; error("") /* ErrorCallExpression */<>; .plus(other = 1); - } + error("") /* ErrorCallExpression */ } fun test3(fn: Function1) { diff --git a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.txt index 1c43268e701..d1943517037 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.txt @@ -104,47 +104,27 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt CONST Int type=kotlin.Int value=42 FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - BLOCK type=kotlin.Unit origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] - GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.reflect.KFunction1 [val] - FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.reflect.KFunction1 origin=null reflectionTarget= - ERROR_CALL 'Unresolved reference: #' type=kotlin.Unit - GET_VAR 'val tmp_1: kotlin.reflect.KFunction1 [val] declared in .test1' type=kotlin.reflect.KFunction1 origin=null - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: ERROR_CALL 'Unresolved reference: #' type=kotlin.Int - GET_VAR 'val tmp_1: kotlin.reflect.KFunction1 [val] declared in .test1' type=kotlin.reflect.KFunction1 origin=null - other: CONST Int type=kotlin.Int value=1 + ERROR_CALL 'FirArraySetCall (resolve isn't supported yet)' type=kotlin.Unit FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - BLOCK type=kotlin.Unit origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.B [val] - GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.B - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.reflect.KFunction1 [val] - FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.reflect.KFunction1 origin=null reflectionTarget= - ERROR_CALL 'Unresolved reference: #' type=kotlin.Unit - GET_VAR 'val tmp_3: kotlin.reflect.KFunction1 [val] declared in .test2' type=kotlin.reflect.KFunction1 origin=null - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: ERROR_CALL 'Unresolved reference: #' type=kotlin.Int - GET_VAR 'val tmp_3: kotlin.reflect.KFunction1 [val] declared in .test2' type=kotlin.reflect.KFunction1 origin=null - other: CONST Int type=kotlin.Int value=1 + ERROR_CALL 'FirArraySetCall (resolve isn't supported yet)' type=kotlin.Unit FUN name:test3 visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY BLOCK type=kotlin.Unit origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:.A [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Function1 [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Function1 [val] GET_VAR 'fn: kotlin.Function1 declared in .test3' type=kotlin.Function1 origin=null CALL 'public final fun set (i: .IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=null - $receiver: GET_VAR 'val tmp_4: .A [val] declared in .test3' type=.A origin=null + $receiver: GET_VAR 'val tmp_0: .A [val] declared in .test3' type=.A origin=null i: TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo - GET_VAR 'val tmp_5: kotlin.Function1 [val] declared in .test3' type=kotlin.Function1 origin=null + GET_VAR 'val tmp_1: kotlin.Function1 [val] declared in .test3' type=kotlin.Function1 origin=null newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun get (i: .IFoo): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val tmp_4: .A [val] declared in .test3' type=.A origin=null + $receiver: GET_VAR 'val tmp_0: .A [val] declared in .test3' type=.A origin=null i: TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo - GET_VAR 'val tmp_5: kotlin.Function1 [val] declared in .test3' type=kotlin.Function1 origin=null + GET_VAR 'val tmp_1: kotlin.Function1 [val] declared in .test3' type=kotlin.Function1 origin=null other: CONST Int type=kotlin.Int value=1 FUN name:test4 visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 @@ -154,18 +134,18 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=.IFoo GET_VAR 'fn: kotlin.Function1 declared in .test4' type=kotlin.Function1 origin=null then: BLOCK type=kotlin.Unit origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:.A [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.A [val] GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:.IFoo [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:.IFoo [val] TYPE_OP type=.IFoo origin=IMPLICIT_CAST typeOperand=.IFoo GET_VAR 'fn: kotlin.Function1 declared in .test4' type=kotlin.Function1 origin=null CALL 'public final fun set (i: .IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=null - $receiver: GET_VAR 'val tmp_6: .A [val] declared in .test4' type=.A origin=null - i: GET_VAR 'val tmp_7: .IFoo [val] declared in .test4' type=.IFoo origin=null + $receiver: GET_VAR 'val tmp_2: .A [val] declared in .test4' type=.A origin=null + i: GET_VAR 'val tmp_3: .IFoo [val] declared in .test4' type=.IFoo origin=null newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun get (i: .IFoo): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val tmp_6: .A [val] declared in .test4' type=.A origin=null - i: GET_VAR 'val tmp_7: .IFoo [val] declared in .test4' type=.IFoo origin=null + $receiver: GET_VAR 'val tmp_2: .A [val] declared in .test4' type=.A origin=null + i: GET_VAR 'val tmp_3: .IFoo [val] declared in .test4' type=.IFoo origin=null other: CONST Int type=kotlin.Int value=1 FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any @@ -174,20 +154,20 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt TYPE_OP type=kotlin.Function1 origin=CAST typeOperand=kotlin.Function1 GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null BLOCK type=kotlin.Unit origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:.A [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:.A [val] GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Function1 [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Function1 [val] TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null CALL 'public final fun set (i: .IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=null - $receiver: GET_VAR 'val tmp_8: .A [val] declared in .test5' type=.A origin=null + $receiver: GET_VAR 'val tmp_4: .A [val] declared in .test5' type=.A origin=null i: TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo - GET_VAR 'val tmp_9: kotlin.Function1 [val] declared in .test5' type=kotlin.Function1 origin=null + GET_VAR 'val tmp_5: kotlin.Function1 [val] declared in .test5' type=kotlin.Function1 origin=null newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun get (i: .IFoo): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val tmp_8: .A [val] declared in .test5' type=.A origin=null + $receiver: GET_VAR 'val tmp_4: .A [val] declared in .test5' type=.A origin=null i: TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo - GET_VAR 'val tmp_9: kotlin.Function1 [val] declared in .test5' type=kotlin.Function1 origin=null + GET_VAR 'val tmp_5: kotlin.Function1 [val] declared in .test5' type=kotlin.Function1 origin=null other: CONST Int type=kotlin.Int value=1 FUN name:test6 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any @@ -200,16 +180,16 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 GET_VAR 'a: kotlin.Any declared in .test6' type=kotlin.Any origin=null BLOCK type=kotlin.Unit origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:.A [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:.A [val] GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Function1 [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Function1 [val] TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 GET_VAR 'a: kotlin.Any declared in .test6' type=kotlin.Any origin=null CALL 'public final fun set (i: .IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=null - $receiver: GET_VAR 'val tmp_10: .A [val] declared in .test6' type=.A origin=null - i: GET_VAR 'val tmp_11: kotlin.Function1 [val] declared in .test6' type=kotlin.Function1 origin=null + $receiver: GET_VAR 'val tmp_6: .A [val] declared in .test6' type=.A origin=null + i: GET_VAR 'val tmp_7: kotlin.Function1 [val] declared in .test6' type=kotlin.Function1 origin=null newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun get (i: .IFoo): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val tmp_10: .A [val] declared in .test6' type=.A origin=null - i: GET_VAR 'val tmp_11: kotlin.Function1 [val] declared in .test6' type=kotlin.Function1 origin=null + $receiver: GET_VAR 'val tmp_6: .A [val] declared in .test6' type=.A origin=null + i: GET_VAR 'val tmp_7: kotlin.Function1 [val] declared in .test6' type=kotlin.Function1 origin=null other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt index d1f0b5ede72..023777232f7 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt @@ -16,7 +16,14 @@ fun test1(a: Any) { } fun test2(a: Any) { - error("") /* ErrorCallExpression */ + { // BLOCK + val <>: Any = a + val <>: Function0 = local fun () { + return Unit + } + + <>.set(index = <>, value = <>.get(index = <>).plus(other = 42)) + } } fun test3(a: Any) { diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt index e801946f7fd..7da6a4444d9 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt @@ -27,26 +27,42 @@ FILE fqName: fileName:/lambdaInCAO.kt FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - ERROR_CALL 'FirArraySetCall (resolve isn't supported yet)' type=kotlin.Unit + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any [val] + GET_VAR 'a: kotlin.Any declared in .test2' type=kotlin.Any origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Function0 [val] + FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test2' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + CALL 'public final fun set (index: kotlin.Function0, value: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=null + $receiver: GET_VAR 'val tmp_0: kotlin.Any [val] declared in .test2' type=kotlin.Any origin=null + index: GET_VAR 'val tmp_1: kotlin.Function0 [val] declared in .test2' type=kotlin.Function0 origin=null + value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Function0): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null + $receiver: GET_VAR 'val tmp_0: kotlin.Any [val] declared in .test2' type=kotlin.Any origin=null + index: GET_VAR 'val tmp_1: kotlin.Function0 [val] declared in .test2' type=kotlin.Function0 origin=null + other: CONST Int type=kotlin.Int value=42 FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Any [val] GET_VAR 'a: kotlin.Any declared in .test3' type=kotlin.Any origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Function0 [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Function0 [val] FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test3' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] CALL 'public final fun get (index: kotlin.Function0): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val tmp_0: kotlin.Any [val] declared in .test3' type=kotlin.Any origin=null - index: GET_VAR 'val tmp_1: kotlin.Function0 [val] declared in .test3' type=kotlin.Function0 origin=null + $receiver: GET_VAR 'val tmp_2: kotlin.Any [val] declared in .test3' type=kotlin.Any origin=null + index: GET_VAR 'val tmp_3: kotlin.Function0 [val] declared in .test3' type=kotlin.Function0 origin=null CALL 'public final fun set (index: kotlin.Function0, value: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=null - $receiver: GET_VAR 'val tmp_0: kotlin.Any [val] declared in .test3' type=kotlin.Any origin=null - index: GET_VAR 'val tmp_1: kotlin.Function0 [val] declared in .test3' type=kotlin.Function0 origin=null + $receiver: GET_VAR 'val tmp_2: kotlin.Any [val] declared in .test3' type=kotlin.Any origin=null + index: GET_VAR 'val tmp_3: kotlin.Function0 [val] declared in .test3' type=kotlin.Function0 origin=null value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - GET_VAR 'val tmp_2: kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null + GET_VAR 'val tmp_4: kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null