Files
kotlin/compiler/testData/codegen/box/callableReference/function/coercionToUnit.kt
2018-08-01 16:26:07 +02:00

17 lines
254 B
Kotlin
Vendored

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