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
// TODO separate bytecode text templates for FIR?
@@ -10,12 +9,10 @@
// -- 2 ASTORE 1
// -- 13 ALOAD 1
@Suppress("DEPRECATION_ERROR")
fun box(): String {
val seq = buildSequence {
yield("O")
yield("K")
}
val it = seq.iterator()
return it.next() + it.next()
}
// NB 'b' is evaluated before 's'
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@kotlin.internal.InlineOnly
inline fun invokeNoInline(noinline b: (String) -> String, s: String) =
b(s)
fun box(): String = invokeNoInline({ it + "K" }, "O")