2be08f4d60
See `checkStatementType`, we return `null` to reduce count of errors. Also, note that named function which is used as last statement in lambda doesn't coerce to Unit, this is a separate bug and will be addressed later, see #KT-25383 #EA-121026 Fixed
11 lines
160 B
Kotlin
Vendored
11 lines
160 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
|
|
fun bar() {
|
|
if (true) <!TYPE_MISMATCH!>{
|
|
<!EXPECTED_TYPE_MISMATCH!>fun local() {
|
|
}<!>
|
|
}<!> else {
|
|
|
|
}
|
|
}
|