[FE 1.0] Process builder inference stub types with different nullability properly

^KT-49887 Fixed
This commit is contained in:
Victor Petukhov
2021-12-08 11:31:35 +03:00
committed by teamcity
parent 32a80bf38e
commit b3943f5ab6
13 changed files with 195 additions and 104 deletions
@@ -0,0 +1,12 @@
// WITH_STDLIB
fun test(): Int = buildList {
add(1)
add(2)
val number = removeLastOrNull() ?: throw Exception()
}.singleOrNull() ?: throw Exception()
fun box(): String {
return if (test() == 1) "OK" else "NOK"
}