Refactoring: "simplify assert not null" is now an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-20 20:59:59 +03:00
parent 8ebe16c9b2
commit 9e919829c8
27 changed files with 134 additions and 132 deletions
@@ -0,0 +1,8 @@
// FIX: "Replace with '!!' operator"
// WITH_RUNTIME
fun foo(p: Array<String?>) {
val v = p[0]
// now let's check it for null
<caret>assert(v != null /* null */) // 'v' should not be null
}