mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
25 lines
405 B
Kotlin
Vendored
25 lines
405 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// KJS_WITH_FULL_RUNTIME
|
|
// !LANGUAGE: +NewInference
|
|
// WITH_RUNTIME
|
|
|
|
// FILE: messages/foo.kt
|
|
|
|
package messages
|
|
|
|
fun foo() {}
|
|
|
|
// FILE: sample.kt
|
|
|
|
class Test {
|
|
val messages = arrayListOf<String>()
|
|
|
|
fun test(): Boolean {
|
|
return messages.any { it == "foo" }
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val result = Test().test()
|
|
return if (result) "faile" else "OK"
|
|
} |