FIR IDE: Don't offer AddExclExclCallFix when expression is definitely

null.
This commit is contained in:
Mark Punzalan
2021-06-01 23:30:51 +00:00
committed by teamcityserver
parent 97ea901507
commit 2773506f4c
9 changed files with 55 additions and 8 deletions
+1 -4
View File
@@ -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
}
}
@@ -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) {}