Files
kotlin-fork/idea/testData/inspectionsLocal/simplifyAssertNotNull/comments.kt.after
T
2017-12-26 18:39:49 +03:00

8 lines
228 B
Plaintext
Vendored

// FIX: "Replace with '?: error(...)'"
// WITH_RUNTIME
fun foo(p: Array<String?>) {
val v = p[0] ?: error(/* null */ /* lazy message */"Should be not null")
// now let's check it for null
// 'v' should not be null
}