[NI] Avoid building controversial systems by clipping extra constraints

#KT-23854 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-03-01 14:13:56 +03:00
parent 92b40ea9d5
commit 9b3e17f0d7
22 changed files with 155 additions and 34 deletions
@@ -6,6 +6,6 @@ fun foo() {
val x: Int? = null
bar(1 + (if (x == null) 0 else x))
bar(<!NI;TYPE_MISMATCH!>if (x == null) <!DEBUG_INFO_CONSTANT, NI;TYPE_MISMATCH, TYPE_MISMATCH!>x<!> else x<!>)
bar(<!NI;TYPE_MISMATCH!>if (x == null) <!DEBUG_INFO_CONSTANT, OI;TYPE_MISMATCH!>x<!> else x<!>)
if (x != null) bar(x + x/(x-x*x))
}