Add IDEA data-flow analysis to guess nullability
Add "if return..." folding to "return if"
This commit is contained in:
+1
-4
@@ -1,8 +1,5 @@
|
||||
internal class A {
|
||||
fun foo(s: String?): Int {
|
||||
if (s != null) {
|
||||
return s.length
|
||||
}
|
||||
return -1
|
||||
return s?.length ?: -1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user