Files
kotlin-fork/compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt
T
2017-11-29 02:54:26 +03:00

11 lines
354 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !CHECK_TYPE
fun test() {
val a = if (true) {
val x = 1
({ <!NI;UNRESOLVED_REFERENCE!>x<!> })
} else {
{ <!NI;UNUSED_EXPRESSION!>2<!> }
}
<!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>checkType<!> { <!NI;UNRESOLVED_REFERENCE!>_<!><() -> Int>() }
}