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
@@ -32,7 +32,7 @@ fun test(x : Int?, a : A?) {
a.times(1)
a * 1
a times 1
a<!UNNECESSARY_SAFE_CALL!>?.<!>times(1)
a?.times(1)
1 <!UNSAFE_INFIX_CALL!>in<!> a
a <!UNSAFE_INFIX_CALL!>contains<!> 1
@@ -12,7 +12,7 @@ fun test(a : A?) {
a?.foo()
a?.bar()
a<!UNNECESSARY_SAFE_CALL!>?.<!>buzz() // warning
a?.buzz()
}
fun A.test2() {
@@ -40,5 +40,5 @@ fun A?.test3() {
this?.foo()
this?.bar()
this<!UNNECESSARY_SAFE_CALL!>?.<!>buzz() // warning
this?.buzz()
}