mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 00:21:28 +00:00
16 lines
228 B
Kotlin
Vendored
16 lines
228 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
|
|
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"
|
|
}
|