mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
17 lines
258 B
Kotlin
Vendored
17 lines
258 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
fun foo(s: String): Boolean {
|
|
if (s != "kotlin") throw AssertionError(s)
|
|
return true
|
|
}
|
|
|
|
fun bar(f: (String) -> Unit) {
|
|
f("kotlin")
|
|
}
|
|
|
|
fun box(): String {
|
|
bar(::foo)
|
|
return "OK"
|
|
}
|