[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,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
val my: String = "O"
|
||||
get() = { field }() + "K"
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
val Int.ext: () -> Int get() = { 5 }
|
||||
val Long.ext: Long get() = 4.ext().toLong() //(c.kt:4)
|
||||
val y: Long get() = 10L.ext
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun runNoInline(f: () -> Unit) = f()
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Reference in New Issue
Block a user