[NI] Infer type variable to Nothing if all upper constraints are from upper bounds

#KT-32196 Fixed
This commit is contained in:
Dmitriy Novozhilov
2019-12-19 11:35:20 +03:00
parent 7fed7a840b
commit e466fd5196
7 changed files with 54 additions and 5 deletions
@@ -0,0 +1,9 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Inv<T>
fun <R : Any> Inv<Int>.mapNotNull(transform: (Int) -> R?): Inv<R> = null!!
fun test(inv: Inv<Int>) {
inv.mapNotNull { null }
}