[FE 1.0] Report warnings or errors for upper bounded type variables by an empty intersection type

This commit is contained in:
Victor Petukhov
2022-02-11 11:49:59 +03:00
committed by teamcity
parent 9474406375
commit 65213e9a42
25 changed files with 233 additions and 12 deletions
@@ -13,7 +13,7 @@ fun testElvis(a: Int?, b: Int?) {
if (a != null) {
doInt(b ?: <!DEBUG_INFO_SMARTCAST!>a<!>)
}
doList(getList() ?: emptyListOfA()) //should be an error
<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>doList<!>(getList() ?: emptyListOfA()) //should be an error
doList(getList() ?: strangeList { doInt(it) }) //lambda was not analyzed
}