NI: introduce warning about implicitly inferred Nothing with existing non-Nothing expected type

^KT-35406 Fixed
This commit is contained in:
Victor Petukhov
2020-02-13 16:09:50 +03:00
parent e3184e407d
commit 51edf2b351
18 changed files with 414 additions and 42 deletions
@@ -9,5 +9,5 @@ fun <K> invOut(y: K?): Inv<Out<K>> = TODO()
fun <R> test(x: Inv<Out<R>>): R = TODO()
fun testNothing() {
<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>test<!>(invOut(null)) checkType { _<Nothing>() }
<!IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION!>test<!>(invOut(null)) checkType { _<Nothing>() }
}