Refactoring: make "if-then to safe access" an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-19 15:41:09 +03:00
parent 91bcfb97c6
commit a8b01a6b00
86 changed files with 433 additions and 410 deletions
@@ -0,0 +1,10 @@
// FIX: Remove redundant 'if' expression
interface Bar
data class Data(val bar: Bar?)
fun handle(data: Data) {
val bar = <caret>if (data.bar != null) data.bar else null
}