KT-8386: pass mutable list to JsInvocation from intrinsic generator, so that inliner had a chance to replace arguments

This commit is contained in:
Alexey Andreev
2016-05-19 19:59:28 +03:00
parent d03fedde74
commit db5baf7fa7
3 changed files with 18 additions and 4 deletions
@@ -0,0 +1,12 @@
package foo
inline fun bar(f: () -> Int): Array<Int> = arrayOf(f())
fun box(): String {
val iterator = bar { 23 }.iterator()
assertEquals(true, iterator.hasNext())
assertEquals(23, iterator.next())
assertEquals(false, iterator.hasNext())
return "OK"
}