[FE] Implement discussed rules to report empty intersection errors

This commit is contained in:
Victor Petukhov
2022-03-28 16:11:18 +03:00
committed by teamcity
parent b96708c3e2
commit 5bfe6cd20a
29 changed files with 241 additions and 62 deletions
@@ -13,7 +13,7 @@ fun testElvis(a: Int?, b: Int?) {
if (a != null) {
doInt(b ?: <!DEBUG_INFO_SMARTCAST!>a<!>)
}
<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>doList<!>(getList() ?: emptyListOfA()) //should be an error
doList(getList() ?: emptyListOfA()) //should be an error
doList(getList() ?: strangeList { doInt(it) }) //lambda was not analyzed
}