Add IDEA data-flow analysis to guess nullability
Add "if return..." folding to "return if"
This commit is contained in:
+3
-4
@@ -1,10 +1,9 @@
|
||||
fun foo(i: Int, j: Int): String {
|
||||
when (i) {
|
||||
0 -> {
|
||||
if (j > 0) {
|
||||
return "1"
|
||||
}
|
||||
return "2"
|
||||
return if (j > 0) {
|
||||
"1"
|
||||
} else "2"
|
||||
}
|
||||
1 -> return "2"
|
||||
else -> return "3"
|
||||
|
||||
Reference in New Issue
Block a user