Add IDEA data-flow analysis to guess nullability
Add "if return..." folding to "return if"
This commit is contained in:
+3
-3
@@ -11,9 +11,9 @@ object Test {
|
||||
return false
|
||||
}
|
||||
val result = true
|
||||
if (parent.isDirectory) {
|
||||
return true
|
||||
return if (parent.isDirectory) {
|
||||
true
|
||||
} else
|
||||
return false
|
||||
false
|
||||
}
|
||||
}
|
||||
+1
-3
@@ -8,9 +8,7 @@ internal class Test {
|
||||
if (s1.isEmpty() && s2.isEmpty())
|
||||
return "OK"
|
||||
|
||||
if (s1.isEmpty() && s2.isEmpty() && s3.isEmpty())
|
||||
return "OOOK"
|
||||
return if (s1.isEmpty() && s2.isEmpty() && s3.isEmpty()) "OOOK" else ""
|
||||
|
||||
return ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user