Add tests with loop in store-load chains on noinline function parameters
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
// FILE: 1.kt
|
||||
inline fun test(noinline foo: () -> String, noinline bar: () -> String): String {
|
||||
var vfoo = foo
|
||||
var vbar = bar
|
||||
var vres = foo
|
||||
for (i in 1 .. 4) {
|
||||
vres = vbar
|
||||
vbar = vfoo
|
||||
vfoo = vres
|
||||
}
|
||||
return vres()
|
||||
}
|
||||
|
||||
|
||||
// FILE: 2.kt
|
||||
fun box(): String =
|
||||
test({ "OK" }, { "wrong lambda" })
|
||||
Reference in New Issue
Block a user