KT-7443 Inspection + intention to replace assert (x != null) with "!!" or elvis
#KT-7443 Fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: "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
|
||||
}
|
||||
Reference in New Issue
Block a user