Add IDEA data-flow analysis to guess nullability

Add "if return..." folding to "return if"
This commit is contained in:
Simon Ogorodnik
2017-05-25 15:54:10 +03:00
parent 1f26353de4
commit e41c027c9a
24 changed files with 261 additions and 40 deletions
@@ -3,7 +3,7 @@
internal class Library {
fun call() {}
val string: String?
val string: String
get() = ""
}
@@ -11,9 +11,9 @@ internal class User {
fun main() {
val lib: Library = Library()
lib.call()
lib.string!!.isEmpty()
lib.string.isEmpty()
Library().call()
Library().string!!.isEmpty()
Library().string.isEmpty()
}
}