KT-13262 related: surround with null check is applicable now also for qualified calls with argument type mismatch
(cherry picked from commit 8f13c84)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
b7fd41844d
commit
39090113e9
@@ -0,0 +1,9 @@
|
||||
// "Surround with null check" "true"
|
||||
|
||||
object Obj {
|
||||
fun foo(x: Int) = x
|
||||
}
|
||||
|
||||
fun use(arg: Int?) {
|
||||
Obj.foo(<caret>arg)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Surround with null check" "true"
|
||||
|
||||
object Obj {
|
||||
fun foo(x: Int) = x
|
||||
}
|
||||
|
||||
fun use(arg: Int?) {
|
||||
if (arg != null) {
|
||||
Obj.foo(arg)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user