7249d2f889
* fixed NoSuchMethod caused by mismatched signatures of the "invoke" method generated for lambda arguments * added test cases in invoke.kt for KFunction and anonymous functions * added a transformer to wrap the last expression in the bodies of lambdas with return
18 lines
1.8 KiB
Plaintext
Vendored
18 lines
1.8 KiB
Plaintext
Vendored
FILE fqName:<root> fileName:/extFunInvokeAsFun.kt
|
|
FUN name:with1 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:kotlin.Function1<kotlin.Any?, kotlin.Unit>) returnType:kotlin.Unit
|
|
VALUE_PARAMETER name:receiver index:0 type:kotlin.Any?
|
|
VALUE_PARAMETER name:block index:1 type:kotlin.Function1<kotlin.Any?, kotlin.Unit>
|
|
BLOCK_BODY
|
|
RETURN type=kotlin.Nothing from='public final fun with1 (receiver: kotlin.Any?, block: kotlin.Function1<kotlin.Any?, kotlin.Unit>): kotlin.Unit declared in <root>'
|
|
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE
|
|
$this: GET_VAR 'block: kotlin.Function1<kotlin.Any?, kotlin.Unit> declared in <root>.with1' type=kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=null
|
|
p1: GET_VAR 'receiver: kotlin.Any? declared in <root>.with1' type=kotlin.Any? origin=null
|
|
FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:kotlin.Function1<kotlin.Any?, kotlin.Unit>) returnType:kotlin.Unit
|
|
VALUE_PARAMETER name:receiver index:0 type:kotlin.Any?
|
|
VALUE_PARAMETER name:block index:1 type:kotlin.Function1<kotlin.Any?, kotlin.Unit>
|
|
BLOCK_BODY
|
|
RETURN type=kotlin.Nothing from='public final fun with2 (receiver: kotlin.Any?, block: kotlin.Function1<kotlin.Any?, kotlin.Unit>): kotlin.Unit declared in <root>'
|
|
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE
|
|
$this: GET_VAR 'block: kotlin.Function1<kotlin.Any?, kotlin.Unit> declared in <root>.with2' type=kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=null
|
|
p1: GET_VAR 'receiver: kotlin.Any? declared in <root>.with2' type=kotlin.Any? origin=null
|