JVM_IR KT-47984 minor avoid using @Deprecated function in tests

This commit is contained in:
Dmitry Petrov
2021-08-11 13:09:18 +03:00
committed by TeamCityServer
parent 55663a0fb1
commit f8503ba1bf
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: WASM
// WITH_RUNTIME // WITH_RUNTIME
// TODO separate bytecode text templates for FIR? // TODO separate bytecode text templates for FIR?
@@ -10,12 +9,10 @@
// -- 2 ASTORE 1 // -- 2 ASTORE 1
// -- 13 ALOAD 1 // -- 13 ALOAD 1
@Suppress("DEPRECATION_ERROR") // NB 'b' is evaluated before 's'
fun box(): String { @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
val seq = buildSequence { @kotlin.internal.InlineOnly
yield("O") inline fun invokeNoInline(noinline b: (String) -> String, s: String) =
yield("K") b(s)
}
val it = seq.iterator() fun box(): String = invokeNoInline({ it + "K" }, "O")
return it.next() + it.next()
}