bcc8802014
Expression will be checked against expected type later. Theoretically, this is not very good, but it aligns with the old inference, plus it helps avoiding multiple type mismatch diagnostics.
6 lines
183 B
Kotlin
Vendored
6 lines
183 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
fun foo(): Int {
|
|
var i: Int? = <!VARIABLE_WITH_REDUNDANT_INITIALIZER!>42<!>
|
|
i = null
|
|
return <!TYPE_MISMATCH!><!OI;DEBUG_INFO_CONSTANT!>i<!> + 1<!>
|
|
} |