KT-2317 Wrong UNNECESSARY_SAFE_CALL
#KT-2317 Fixed
This commit is contained in:
committed by
Alexander Udalov
parent
bb8dc49692
commit
b2defb2cb4
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user