Files
kotlin-fork/compiler/testData/codegen/box/callableReference/varargAndDefaults/bothWithCoercionToUnit.kt
T
Roman Artemev 7f215d3f52 Update tests
2018-11-01 16:51:38 +03:00

18 lines
334 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// IGNORE_BACKEND: JS, JVM_IR
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"
}