Relax rules about inferring to Nothing for special calls
#KT-37388 Fixed #KT-38427 Fixed #KT-39953 Fixed #KT-38899 Fixed
This commit is contained in:
+3
-3
@@ -1,10 +1,10 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
val test: Int = <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>if (true) {
|
||||
val test: Int = if (true) <!NI;TYPE_MISMATCH!>{
|
||||
when (2) {
|
||||
1 -> 1
|
||||
else -> <!OI;NULL_FOR_NONNULL_TYPE!>null<!>
|
||||
}
|
||||
}
|
||||
}<!>
|
||||
else {
|
||||
2
|
||||
}<!>
|
||||
}
|
||||
Reference in New Issue
Block a user