[NI] Add Nothing constraint if it was inferred from a call

This commit is contained in:
Mikhail Zarechenskiy
2019-03-25 11:09:40 +03:00
parent ca894a6a71
commit 3eda7c462b
9 changed files with 14 additions and 15 deletions
@@ -8,15 +8,15 @@ fun test(a: Int?, b: Int?) {
}
fun test(a: Int?, b: Int?, c: Int?) {
bar(<!NI;TYPE_MISMATCH!>if (a == null) return else if (b == null) return else <!OI;TYPE_MISMATCH!>c<!><!>)
bar(<!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>if (a == null) return else if (b == null) return else <!OI;TYPE_MISMATCH!>c<!><!>)
}
fun test(a: Any?, b: Any?, c: Int?) {
bar(<!NI;TYPE_MISMATCH!>if (a == null) if (b == null) <!OI;TYPE_MISMATCH!>c<!> else return else return<!>)
bar(<!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>if (a == null) if (b == null) <!OI;TYPE_MISMATCH!>c<!> else return else return<!>)
}
fun test(a: Int?, b: Any?, c: Int?) {
bar(<!NI;TYPE_MISMATCH!>if (a == null) {
bar(<!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>if (a == null) {
return
} else {
if (b == null) {