FIR checker: warn unnecessary non-null assertions
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5229d4e4f4
commit
2ecb6733ed
@@ -3,10 +3,10 @@ operator fun <K, V> MutableMap<K, V>.set(k: K, v: V) {}
|
||||
|
||||
fun foo(a: MutableMap<String, String>, x: String?) {
|
||||
a[x!!] = x
|
||||
a[x] = x!!
|
||||
a[x] = x<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
|
||||
}
|
||||
|
||||
fun foo1(a: MutableMap<String, String>, x: String?) {
|
||||
<!INAPPLICABLE_CANDIDATE!>a[x]<!> = x!!
|
||||
a[x!!] = x
|
||||
a[x<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>] = x
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user