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