FIR IDE: Don't offer AddExclExclCallFix when expression is definitely
null.
This commit is contained in:
committed by
teamcityserver
parent
97ea901507
commit
2773506f4c
@@ -8,7 +8,4 @@ fun foo(arg: String?) {
|
||||
if (arg == null) {
|
||||
val x: String = arg<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Need data flow info from null check
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Add non-null asserted (!!) call" "false"
|
||||
|
||||
fun foo(arg: String?) {
|
||||
if (arg == null) {
|
||||
arg<caret>.length
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(arg: String?) {
|
||||
if (arg == null) {
|
||||
arg<caret>.length
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(arg: String?) {
|
||||
if (arg == null) {
|
||||
arg!!.length
|
||||
}
|
||||
}
|
||||
+1
-4
@@ -12,7 +12,4 @@ fun test(i: Int?) {
|
||||
}
|
||||
}
|
||||
|
||||
fun other(i: Int) {}
|
||||
|
||||
// TODO: Need data flow info from null check
|
||||
/* IGNORE_FIR */
|
||||
fun other(i: Int) {}
|
||||
Reference in New Issue
Block a user