KT-36024 Generate adapted callable references as lambdas

Make sure both JVM and JVM_IR use the same information to determine
whether a callable reference requires argument adaptation.
This commit is contained in:
Dmitry Petrov
2020-03-19 14:03:01 +03:00
committed by Alexander Udalov
parent ddf7f53118
commit d1c5a42124
29 changed files with 478 additions and 183 deletions
@@ -0,0 +1,38 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
import kotlin.reflect.KCallable
fun checkUnit(label: String, fn: () -> Unit) {
if (fn is KCallable<*>) {
throw AssertionError("$label is KCallable, ${fn::class.java.simpleName}")
}
}
fun checkAny(label: String, fn: () -> Any) {
if (fn is KCallable<*>) {
throw AssertionError("$label is KCallable, ${fn::class.java.simpleName}")
}
}
fun withDefaults(a: Int = 1, b: Int = 2) {}
fun withVarargs(vararg xs: Int) {}
fun withCoercion() = 1
class CWithDefaults(x: Int = 1, y: Int = 2)
class CWithVarargs(vararg xs: Int)
fun box(): String {
checkUnit("::withDefaults", ::withDefaults)
checkUnit("::withVarargs", ::withVarargs)
checkUnit("::withCoercion", ::withCoercion)
checkAny("::CWithDefaults", ::CWithDefaults)
checkAny("::CWithVarargs", ::CWithVarargs)
// TODO KT-37604
// checkUnit("::CWithDefaults", ::CWithDefaults)
// checkUnit("::CWithVarargs", ::CWithVarargs)
return "OK"
}
@@ -44,7 +44,7 @@ FILE fqName:<root> fileName:/adaptedExtensionFunctions.kt
FUN name:testExtensionVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<<root>.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
f: BLOCK type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=null
f: FUN_EXPR type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionVararg visibility:local modality:FINAL <> (p0:<root>.C, p1:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:<root>.C
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int
@@ -52,11 +52,10 @@ FILE fqName:<root> fileName:/adaptedExtensionFunctions.kt
CALL 'public final fun extensionVararg (i: kotlin.Int, vararg s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR 'p0: <root>.C declared in <root>.testExtensionVararg.extensionVararg' type=<root>.C origin=null
i: GET_VAR 'p1: kotlin.Int declared in <root>.testExtensionVararg.extensionVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun extensionVararg (p0: <root>.C, p1: kotlin.Int): kotlin.Unit declared in <root>.testExtensionVararg' type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testExtensionDefault visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<<root>.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
f: BLOCK type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=null
f: FUN_EXPR type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionDefault visibility:local modality:FINAL <> (p0:<root>.C, p1:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:<root>.C
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int
@@ -64,11 +63,10 @@ FILE fqName:<root> fileName:/adaptedExtensionFunctions.kt
CALL 'public final fun extensionDefault (i: kotlin.Int, s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR 'p0: <root>.C declared in <root>.testExtensionDefault.extensionDefault' type=<root>.C origin=null
i: GET_VAR 'p1: kotlin.Int declared in <root>.testExtensionDefault.extensionDefault' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun extensionDefault (p0: <root>.C, p1: kotlin.Int): kotlin.Unit declared in <root>.testExtensionDefault' type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testExtensionBoth visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<<root>.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
f: BLOCK type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=null
f: FUN_EXPR type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionBoth visibility:local modality:FINAL <> (p0:<root>.C, p1:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:<root>.C
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int
@@ -76,4 +74,3 @@ FILE fqName:<root> fileName:/adaptedExtensionFunctions.kt
CALL 'public final fun extensionBoth (i: kotlin.Int, s: kotlin.String, vararg t: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR 'p0: <root>.C declared in <root>.testExtensionBoth.extensionBoth' type=<root>.C origin=null
i: GET_VAR 'p1: kotlin.Int declared in <root>.testExtensionBoth.extensionBoth' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun extensionBoth (p0: <root>.C, p1: kotlin.Int): kotlin.Unit declared in <root>.testExtensionBoth' type=kotlin.reflect.KFunction2<<root>.C, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
@@ -0,0 +1,41 @@
FILE fqName:<root> fileName:/adaptedWithCoercionToUnit.kt
FUN name:useUnit0 visibility:public modality:FINAL <> (fn:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<kotlin.Unit>
BLOCK_BODY
FUN name:useUnit1 visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
BLOCK_BODY
FUN name:fn0 visibility:public modality:FINAL <> () returnType:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fn0 (): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:fn1 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:x index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fn1 (x: kotlin.Int): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:fnv visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:test0 visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test0 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useUnit0]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun fn0 (): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Int> origin=null reflectionTarget=<same>
FUN name:test1 visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useUnit1]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun fn1 (x: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testV0 visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testV0 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useUnit0]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testV1 visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testV1 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useUnit1]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
@@ -0,0 +1,11 @@
fun useUnit0(fn: () -> Unit) {}
fun useUnit1(fn: (Int) -> Unit) {}
fun fn0() = 1
fun fn1(x: Int) = 1
fun fnv(vararg xs: Int) = 1
fun test0() = useUnit0(::fn0)
fun test1() = useUnit1(::fn1)
fun testV0() = useUnit0(::fnv)
fun testV1() = useUnit1(::fnv)
@@ -0,0 +1,62 @@
FILE fqName:<root> fileName:/adaptedWithCoercionToUnit.kt
FUN name:useUnit0 visibility:public modality:FINAL <> (fn:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<kotlin.Unit>
BLOCK_BODY
FUN name:useUnit1 visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
BLOCK_BODY
FUN name:fn0 visibility:public modality:FINAL <> () returnType:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fn0 (): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:fn1 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:x index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fn1 (x: kotlin.Int): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:fnv visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:test0 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test0 (): kotlin.Unit declared in <root>'
CALL 'public final fun useUnit0 (fn: kotlin.Function0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction0<kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fn0 visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun fn0 (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Unit declared in <root>'
CALL 'public final fun useUnit1 (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fn1 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun fn1 (x: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
x: GET_VAR 'p0: kotlin.Int declared in <root>.test1.fn1' type=kotlin.Int origin=null
FUN name:testV0 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testV0 (): kotlin.Unit declared in <root>'
CALL 'public final fun useUnit0 (fn: kotlin.Function0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction0<kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnv visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
FUN name:testV1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testV1 (): kotlin.Unit declared in <root>'
CALL 'public final fun useUnit1 (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnv visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testV1.fnv' type=kotlin.Int origin=null
@@ -109,7 +109,7 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.IFoo [val]
TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -117,7 +117,6 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.test1.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.test1' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test1' type=<root>.A origin=null
i: GET_VAR 'val tmp_1: <root>.IFoo [val] declared in <root>.test1' type=<root>.IFoo origin=null
@@ -133,7 +132,7 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.B
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.IFoo2 [val]
TYPE_OP type=<root>.IFoo2 origin=SAM_CONVERSION typeOperand=<root>.IFoo2
BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -141,7 +140,6 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.test2.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.test2' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
CALL 'public final fun set (i: <root>.IFoo2, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_2: <root>.B [val] declared in <root>.test2' type=<root>.B origin=null
i: GET_VAR 'val tmp_3: <root>.IFoo2 [val] declared in <root>.test2' type=<root>.IFoo2 origin=null
@@ -70,7 +70,7 @@ FILE fqName:<root> fileName:/constructorWithAdaptedArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testConstructor (): kotlin.Any declared in <root>'
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.Any>): kotlin.Any declared in <root>' type=kotlin.Any origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, <root>.C> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, <root>.C> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:<init> visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:<root>.C
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -78,13 +78,12 @@ FILE fqName:<root> fileName:/constructorWithAdaptedArguments.kt
CONSTRUCTOR_CALL 'public constructor <init> (vararg xs: kotlin.Int) [primary] declared in <root>.C' type=<root>.C origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testConstructor.<init>' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun <init> (p0: kotlin.Int): <root>.C declared in <root>.testConstructor' type=kotlin.reflect.KFunction1<kotlin.Int, <root>.C> origin=null reflectionTarget=null
FUN name:testInnerClassConstructor visibility:public modality:FINAL <> (outer:<root>.Outer) returnType:kotlin.Any
VALUE_PARAMETER name:outer index:0 type:<root>.Outer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInnerClassConstructor (outer: <root>.Outer): kotlin.Any declared in <root>'
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.Any>): kotlin.Any declared in <root>' type=kotlin.Any origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, <root>.Outer.Inner> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, <root>.Outer.Inner> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:<init> visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:<root>.Outer.Inner
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -93,7 +92,6 @@ FILE fqName:<root> fileName:/constructorWithAdaptedArguments.kt
$outer: GET_VAR 'outer: <root>.Outer declared in <root>.testInnerClassConstructor' type=<root>.Outer origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testInnerClassConstructor.<init>' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun <init> (p0: kotlin.Int): <root>.Outer.Inner declared in <root>.testInnerClassConstructor' type=kotlin.reflect.KFunction1<kotlin.Int, <root>.Outer.Inner> origin=null reflectionTarget=null
FUN name:testInnerClassConstructorCapturingOuter visibility:public modality:FINAL <> () returnType:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInnerClassConstructorCapturingOuter (): kotlin.Any declared in <root>'
@@ -101,12 +99,12 @@ FILE fqName:<root> fileName:/constructorWithAdaptedArguments.kt
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, <root>.Outer.Inner> origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.Outer [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer' type=<root>.Outer origin=null
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:<init> visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:<root>.Outer.Inner
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <init> (p0: kotlin.Int): <root>.Outer.Inner declared in <root>.testInnerClassConstructorCapturingOuter'
CONSTRUCTOR_CALL 'public constructor <init> (vararg xs: kotlin.Int) [primary] declared in <root>.Outer.Inner' type=<root>.Outer.Inner origin=null
$outer: GET_VAR 'val tmp_0: <root>.Outer [val] declared in <root>.testInnerClassConstructorCapturingOuter' type=<root>.Outer origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testInnerClassConstructorCapturingOuter.<init>' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun <init> (p0: kotlin.Int): <root>.Outer.Inner declared in <root>.testInnerClassConstructorCapturingOuter' type=kotlin.reflect.KFunction1<kotlin.Int, <root>.Outer.Inner> origin=null reflectionTarget=null
FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, <root>.Outer.Inner> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:<init> visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:<root>.Outer.Inner
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <init> (p0: kotlin.Int): <root>.Outer.Inner declared in <root>.testInnerClassConstructorCapturingOuter'
CONSTRUCTOR_CALL 'public constructor <init> (vararg xs: kotlin.Int) [primary] declared in <root>.Outer.Inner' type=<root>.Outer.Inner origin=null
$outer: GET_VAR 'val tmp_0: <root>.Outer [val] declared in <root>.testInnerClassConstructorCapturingOuter' type=<root>.Outer origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testInnerClassConstructorCapturingOuter.<init>' type=kotlin.Int origin=null
@@ -49,19 +49,17 @@ FILE fqName:<root> fileName:/kt37131.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testFn (): kotlin.Any declared in <root>'
CALL 'public final fun use (fn: kotlin.Function0<kotlin.Any>): kotlin.Any declared in <root>' type=kotlin.Any origin=null
fn: BLOCK type=kotlin.reflect.KFunction0<kotlin.String> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction0<kotlin.String> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo visibility:local modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun foo (): kotlin.String declared in <root>.testFn'
CALL 'public final fun foo (x: kotlin.String): kotlin.String declared in <root>' type=kotlin.String origin=null
FUNCTION_REFERENCE 'local final fun foo (): kotlin.String declared in <root>.testFn' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=null
FUN name:testCtor visibility:public modality:FINAL <> () returnType:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testCtor (): kotlin.Any declared in <root>'
CALL 'public final fun use (fn: kotlin.Function0<kotlin.Any>): kotlin.Any declared in <root>' type=kotlin.Any origin=null
fn: BLOCK type=kotlin.reflect.KFunction0<<root>.C> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction0<<root>.C> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:<init> visibility:local modality:FINAL <> () returnType:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <init> (): <root>.C declared in <root>.testCtor'
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.String) [primary] declared in <root>.C' type=<root>.C origin=null
FUNCTION_REFERENCE 'local final fun <init> (): <root>.C declared in <root>.testCtor' type=kotlin.reflect.KFunction0<<root>.C> origin=null reflectionTarget=null
@@ -60,7 +60,7 @@ FILE fqName:<root> fileName:/unboundMemberReferenceWithAdaptedArguments.kt
FUN name:testUnbound visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun use1 (fn: kotlin.Function2<<root>.A, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction2<<root>.A, kotlin.Int, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction2<<root>.A, kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo visibility:local modality:FINAL <> (p0:<root>.A, p1:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:<root>.A
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int
@@ -70,12 +70,11 @@ FILE fqName:<root> fileName:/unboundMemberReferenceWithAdaptedArguments.kt
$this: GET_VAR 'p0: <root>.A declared in <root>.testUnbound.foo' type=<root>.A origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p1: kotlin.Int declared in <root>.testUnbound.foo' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun foo (p0: <root>.A, p1: kotlin.Int): kotlin.Unit declared in <root>.testUnbound' type=kotlin.reflect.KFunction2<<root>.A, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testBound visibility:public modality:FINAL <> (a:<root>.A) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:<root>.A
BLOCK_BODY
CALL 'public final fun use2 (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -84,11 +83,10 @@ FILE fqName:<root> fileName:/unboundMemberReferenceWithAdaptedArguments.kt
$this: GET_VAR 'a: <root>.A declared in <root>.testBound' type=<root>.A origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testBound.foo' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun foo (p0: kotlin.Int): kotlin.Unit declared in <root>.testBound' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testObject visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun use2 (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -97,4 +95,3 @@ FILE fqName:<root> fileName:/unboundMemberReferenceWithAdaptedArguments.kt
$this: GET_OBJECT 'CLASS OBJECT name:Obj modality:FINAL visibility:public superTypes:[<root>.A]' type=<root>.Obj
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testObject.foo' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun foo (p0: kotlin.Int): kotlin.Unit declared in <root>.testObject' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
@@ -29,7 +29,7 @@ FILE fqName:<root> fileName:/withAdaptationForSam.kt
BLOCK_BODY
CALL 'public final fun useFoo (foo: <root>.IFoo): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
foo: TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -37,4 +37,3 @@ FILE fqName:<root> fileName:/withAdaptationForSam.kt
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.test.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.test' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
@@ -6,6 +6,12 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.String> declared in <root>.use' type=kotlin.Function1<kotlin.Int, kotlin.String> origin=null
p1: CONST Int type=kotlin.Int value=1
FUN name:use0 visibility:public modality:FINAL <> (fn:kotlin.Function0<kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun use0 (fn: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.String origin=INVOKE
$this: GET_VAR 'fn: kotlin.Function0<kotlin.String> declared in <root>.use0' type=kotlin.Function0<kotlin.String> origin=null
FUN name:coerceToUnit visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
BLOCK_BODY
@@ -17,6 +23,16 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>'
CONST String type=kotlin.String value="abc"
FUN name:fnWithDefaults visibility:public modality:FINAL <> (a:kotlin.Int, b:kotlin.Int) returnType:kotlin.String
VALUE_PARAMETER name:a index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=1
VALUE_PARAMETER name:b index:1 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=2
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fnWithDefaults (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>'
CONST String type=kotlin.String value=""
FUN name:fnWithVarargs visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
@@ -68,3 +84,13 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun importedObjectMemberWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
$this: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
FUN name:testDefault0 visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testDefault0 (): kotlin.String declared in <root>'
CALL 'public final fun use0 (fn: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
fn: FUNCTION_REFERENCE 'public final fun fnWithDefaults (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
FUN name:testVararg0 visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testVararg0 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use0]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
@@ -3,10 +3,14 @@ import Host.importedObjectMemberWithVarargs
fun use(fn: (Int) -> String) = fn(1)
fun use0(fn: () -> String) = fn()
fun coerceToUnit(fn: (Int) -> Unit) {}
fun fnWithDefault(a: Int, b: Int = 42) = "abc"
fun fnWithDefaults(a: Int = 1, b: Int = 2) = ""
fun fnWithVarargs(vararg xs: Int) = "abc"
object Host {
@@ -19,4 +23,8 @@ fun testVararg() = use(::fnWithVarargs)
fun testCoercionToUnit() = coerceToUnit(::fnWithDefault)
fun testImportedObjectMember() = use(::importedObjectMemberWithVarargs)
fun testImportedObjectMember() = use(::importedObjectMemberWithVarargs)
fun testDefault0() = use0(::fnWithDefaults)
fun testVararg0() = use0(::fnWithVarargs)
@@ -6,6 +6,12 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.String origin=INVOKE
$this: GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.String> declared in <root>.use' type=kotlin.Function1<kotlin.Int, kotlin.String> origin=VARIABLE_AS_FUNCTION
p1: CONST Int type=kotlin.Int value=1
FUN name:use0 visibility:public modality:FINAL <> (fn:kotlin.Function0<kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun use0 (fn: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>'
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.String origin=INVOKE
$this: GET_VAR 'fn: kotlin.Function0<kotlin.String> declared in <root>.use0' type=kotlin.Function0<kotlin.String> origin=VARIABLE_AS_FUNCTION
FUN name:coerceToUnit visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
BLOCK_BODY
@@ -17,6 +23,16 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>'
CONST String type=kotlin.String value="abc"
FUN name:fnWithDefaults visibility:public modality:FINAL <> (a:kotlin.Int, b:kotlin.Int) returnType:kotlin.String
VALUE_PARAMETER name:a index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=1
VALUE_PARAMETER name:b index:1 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=2
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fnWithDefaults (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>'
CONST String type=kotlin.String value=""
FUN name:fnWithVarargs visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
@@ -51,19 +67,18 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testDefault (): kotlin.String declared in <root>'
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithDefault visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun fnWithDefault (p0: kotlin.Int): kotlin.String declared in <root>.testDefault'
CALL 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
a: GET_VAR 'p0: kotlin.Int declared in <root>.testDefault.fnWithDefault' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun fnWithDefault (p0: kotlin.Int): kotlin.String declared in <root>.testDefault' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null reflectionTarget=null
FUN name:testVararg visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testVararg (): kotlin.String declared in <root>'
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithVarargs visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -71,24 +86,22 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
CALL 'public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testVararg.fnWithVarargs' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun fnWithVarargs (p0: kotlin.Int): kotlin.String declared in <root>.testVararg' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null reflectionTarget=null
FUN name:testCoercionToUnit visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testCoercionToUnit (): kotlin.Unit declared in <root>'
CALL 'public final fun coerceToUnit (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithDefault visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
a: GET_VAR 'p0: kotlin.Int declared in <root>.testCoercionToUnit.fnWithDefault' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun fnWithDefault (p0: kotlin.Int): kotlin.Unit declared in <root>.testCoercionToUnit' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testImportedObjectMember visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testImportedObjectMember (): kotlin.String declared in <root>'
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:importedObjectMemberWithVarargs visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -97,4 +110,21 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
$this: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testImportedObjectMember.importedObjectMemberWithVarargs' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun importedObjectMemberWithVarargs (p0: kotlin.Int): kotlin.String declared in <root>.testImportedObjectMember' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null reflectionTarget=null
FUN name:testDefault0 visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testDefault0 (): kotlin.String declared in <root>'
CALL 'public final fun use0 (fn: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction0<kotlin.String> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithDefaults visibility:local modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun fnWithDefaults (): kotlin.String declared in <root>.testDefault0'
CALL 'public final fun fnWithDefaults (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
FUN name:testVararg0 visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testVararg0 (): kotlin.String declared in <root>'
CALL 'public final fun use0 (fn: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction0<kotlin.String> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithVarargs visibility:local modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun fnWithVarargs (): kotlin.String declared in <root>.testVararg0'
CALL 'public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
@@ -21,7 +21,7 @@ FILE fqName:<root> fileName:/withArgumentAdaptationAndReceiver.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -30,14 +30,13 @@ FILE fqName:<root> fileName:/withArgumentAdaptationAndReceiver.kt
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host.testImplicitThis' type=<root>.Host origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.Host.testImplicitThis.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.Host.testImplicitThis' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testBoundReceiverLocalVal visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
VAR name:h type:<root>.Host [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Host' type=<root>.Host origin=null
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -46,7 +45,6 @@ FILE fqName:<root> fileName:/withArgumentAdaptationAndReceiver.kt
$this: GET_VAR 'val h: <root>.Host [val] declared in <root>.Host.testBoundReceiverLocalVal' type=<root>.Host origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.Host.testBoundReceiverLocalVal.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.Host.testBoundReceiverLocalVal' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testBoundReceiverLocalVar visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
@@ -56,21 +54,21 @@ FILE fqName:<root> fileName:/withArgumentAdaptationAndReceiver.kt
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.Host [val]
GET_VAR 'var h: <root>.Host [var] declared in <root>.Host.testBoundReceiverLocalVar' type=<root>.Host origin=null
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.String origin=null
$this: GET_VAR 'val tmp_0: <root>.Host [val] declared in <root>.Host.testBoundReceiverLocalVar' type=<root>.Host origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.Host.testBoundReceiverLocalVar.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.Host.testBoundReceiverLocalVar' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.String origin=null
$this: GET_VAR 'val tmp_0: <root>.Host [val] declared in <root>.Host.testBoundReceiverLocalVar' type=<root>.Host origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.Host.testBoundReceiverLocalVar.withVararg' type=kotlin.Int origin=null
FUN name:testBoundReceiverParameter visibility:public modality:FINAL <> ($this:<root>.Host, h:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
VALUE_PARAMETER name:h index:0 type:<root>.Host
BLOCK_BODY
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -79,7 +77,6 @@ FILE fqName:<root> fileName:/withArgumentAdaptationAndReceiver.kt
$this: GET_VAR 'h: <root>.Host declared in <root>.Host.testBoundReceiverParameter' type=<root>.Host origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.Host.testBoundReceiverParameter.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.Host.testBoundReceiverParameter' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN name:testBoundReceiverExpression visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
@@ -87,15 +84,15 @@ FILE fqName:<root> fileName:/withArgumentAdaptationAndReceiver.kt
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.Host [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Host' type=<root>.Host origin=null
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.String origin=null
$this: GET_VAR 'val tmp_1: <root>.Host [val] declared in <root>.Host.testBoundReceiverExpression' type=<root>.Host origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.Host.testBoundReceiverExpression.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.Host.testBoundReceiverExpression' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.String origin=null
$this: GET_VAR 'val tmp_1: <root>.Host [val] declared in <root>.Host.testBoundReceiverExpression' type=<root>.Host origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.Host.testBoundReceiverExpression.withVararg' type=kotlin.Int origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
@@ -61,7 +61,7 @@ FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun usePlainArgs (fn: kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction2<kotlin.Int, kotlin.Int, kotlin.Int> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction2<kotlin.Int, kotlin.Int, kotlin.Int> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:sum visibility:local modality:FINAL <> (p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int
@@ -71,7 +71,6 @@ FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testPlainArgs.sum' type=kotlin.Int origin=null
GET_VAR 'p1: kotlin.Int declared in <root>.testPlainArgs.sum' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in <root>.testPlainArgs' type=kotlin.reflect.KFunction2<kotlin.Int, kotlin.Int, kotlin.Int> origin=null reflectionTarget=null
FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1<kotlin.IntArray, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
@@ -83,7 +82,7 @@ FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun useStringArray (fn: kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Array<out kotlin.String>, kotlin.Unit> origin=null
fn: FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Array<out kotlin.String>, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:zap visibility:local modality:FINAL <> (p0:kotlin.Array<out kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Array<out kotlin.String>
BLOCK_BODY
@@ -91,4 +90,3 @@ FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
b: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
SPREAD_ELEMENT
GET_VAR 'p0: kotlin.Array<out kotlin.String> declared in <root>.testArrayAndDefaults.zap' type=kotlin.Array<out kotlin.String> origin=null
FUNCTION_REFERENCE 'local final fun zap (p0: kotlin.Array<out kotlin.String>): kotlin.Unit declared in <root>.testArrayAndDefaults' type=kotlin.reflect.KFunction1<kotlin.Array<out kotlin.String>, kotlin.Unit> origin=null reflectionTarget=null
@@ -66,7 +66,7 @@ FILE fqName:<root> fileName:/samConversionInVarargs.kt
CALL 'public final fun useVararg (vararg foos: <root>.IFoo): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
foos: VARARG type=kotlin.Array<out <root>.IFoo> varargElementType=<root>.IFoo
TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
FUN_EXPR type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVarargOfInt visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
BLOCK_BODY
@@ -74,4 +74,3 @@ FILE fqName:<root> fileName:/samConversionInVarargs.kt
CALL 'public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.testAdaptedCR.withVarargOfInt' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVarargOfInt (p0: kotlin.Int): kotlin.Unit declared in <root>.testAdaptedCR' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null
@@ -35,7 +35,11 @@ FILE fqName:<root> fileName:/samConversionOnCallableReference.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testSamCosntructorOnAdapted (): <root>.KRunnable declared in <root>'
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
FUNCTION_REFERENCE 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
FUN_EXPR type=kotlin.reflect.KFunction0<kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
FUN name:testSamConversion visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun use (r: <root>.KRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
@@ -45,4 +49,8 @@ FILE fqName:<root> fileName:/samConversionOnCallableReference.kt
BLOCK_BODY
CALL 'public final fun use (r: <root>.KRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
r: TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
FUNCTION_REFERENCE 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
FUN_EXPR type=kotlin.reflect.KFunction0<kotlin.Unit> origin=LAMBDA
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null