mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
18 lines
326 B
Kotlin
Vendored
18 lines
326 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// IGNORE_BACKEND: JS
|
|
|
|
fun foo(s: String = "kotlin", vararg t: String): Boolean {
|
|
if (s != "kotlin") throw AssertionError(s)
|
|
if (t.size != 0) throw AssertionError(t.size.toString())
|
|
return true
|
|
}
|
|
|
|
fun bar(f: () -> Unit) {
|
|
f()
|
|
}
|
|
|
|
fun box(): String {
|
|
bar(::foo)
|
|
return "OK"
|
|
}
|