[FIR] Fix translation of invokes & add return expressions for lambdas
* 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
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5eedba3903
commit
7249d2f889
+1
-1
@@ -47,6 +47,6 @@ FILE fqName:<root> fileName:/augmentedAssignmentWithExpression.kt
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Function0<<root>.Host>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in <root>.Host' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public abstract fun invoke (): <root>.Host [operator] declared in kotlin.Function0' type=<root>.Host origin=null
|
||||
$this: CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=<root>.Host origin=INVOKE
|
||||
$this: GET_VAR 'a: kotlin.Function0<<root>.Host> declared in <root>.test4' type=kotlin.Function0<<root>.Host> origin=null
|
||||
x: CONST Int type=kotlin.Int value=1
|
||||
|
||||
Reference in New Issue
Block a user