Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/CoercionToUnit.kt
T

10 lines
198 B
Kotlin
Vendored

fun foo(u : Unit) : Int = 1
fun test() : Int {
foo(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
val a : () -> Unit = {
foo(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
}
return 1
}