KT-2223 Comparing non-null value with null might produce helpful warning

#KT-2223 Fixed
This commit is contained in:
Alexander Udalov
2012-06-20 17:20:45 +04:00
parent aed160e02a
commit d67e22b174
12 changed files with 92 additions and 46 deletions
@@ -0,0 +1,8 @@
//KT-2223 Comparing non-null value with null might produce helpful warning
package kt2223
fun foo() {
val x: Int? = null
if (x == null) return
if (<!SENSELESS_COMPARISON!>x == null<!>) return
}