JS/Inlining: in expression like f(g()), where *f* is inline, don't treat g() as a lambda constructor

This commit is contained in:
Alexey Andreev
2016-05-05 17:05:20 +03:00
parent 65876c36eb
commit ee6483b7ec
3 changed files with 18 additions and 4 deletions
@@ -0,0 +1,10 @@
package foo
inline fun block(p: () -> Int) = p()
fun createFunction(x: Int): () -> Int = { x }
fun box(): String {
assertEquals(23, block(createFunction(23)))
return "OK"
}