KT-2317 Wrong UNNECESSARY_SAFE_CALL

#KT-2317 Fixed
This commit is contained in:
Alexander Udalov
2012-06-26 01:36:29 +04:00
committed by Alexander Udalov
parent bb8dc49692
commit b2defb2cb4
7 changed files with 23 additions and 8 deletions
@@ -66,10 +66,10 @@ import outer.*
command.equals(null)
command?.equals(null)
command.equals1(null)
command<!UNNECESSARY_SAFE_CALL!>?.<!>equals1(null)
command?.equals1(null)
val c = Command()
c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)
if (command == null) 1
}
}
@@ -0,0 +1,15 @@
//KT-2317 Wrong UNNECESSARY_SAFE_CALL
package kt2317
fun Any?.baz() = 1
fun foo(l: Long?) = l?.baz()
fun Any?.bar(): Unit { }
fun quux(x: Int?): Unit {
x?.baz()
x?.bar()
}