Files
kotlin-fork/compiler/testData/codegen/bytecodeText/lineNumbers/inlineCondition2.kt
T
Mark Punzalan 238cc7c257 [FIR] Enable BytecodeText tests for FIR.
143 out of 767 tests (18.6%) are currently failing.
2020-09-29 10:21:21 +03:00

17 lines
336 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
//FILE: test.kt
fun box() {
if (listOf(1, 2, 3).myAny { it > 2 } == true) {
println("foo")
}
}
public inline fun <T> Iterable<T>.myAny(predicate: (T) -> Boolean): Boolean {
for (element in this) {
if (predicate(element)) return true
}
return false
}
// 3 LINENUMBER 4