Fixed evaluation of lambda arguments of inline call + test

A lambda argument should be inlined only if it is declared as a functional type.
This commit is contained in:
Igor Chevdar
2018-01-21 23:39:33 +03:00
committed by Igor Chevdar
parent 295f71a29c
commit e75a39fdd1
3 changed files with 23 additions and 4 deletions
@@ -0,0 +1,11 @@
package codegen.inline.lambdaAsAny
import kotlin.test.*
inline fun foo(x: Any) {
println(if (x === x) "Ok" else "Fail")
}
@Test fun runTest() {
foo { 42 }
}