FIR: more exact nullability determination in potential UNSAFE_CALL check

This commit is contained in:
Mikhail Glukhikh
2021-01-28 21:29:09 +03:00
parent e72ddbcbfe
commit 0ee4f1f393
30 changed files with 82 additions and 69 deletions
@@ -5,7 +5,7 @@ fun foo(block: () -> (() -> Int)) {}
fun test() {
val x = <!EXPRESSION_REQUIRED!>fun named1(x: Int): Int { return 1 }<!>
x <!UNSAFE_CALL!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Int, Int>>() }
x <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Int, Int>>() }
foo { fun named2(): Int {return 1} }
foo({ fun named3() = 1 })