Files
kotlin-fork/idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noCondition.kt
T
2017-12-26 18:39:47 +03:00

9 lines
240 B
Kotlin
Vendored

// PROBLEM: none
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
fun main(args: Array<String>) {
val foo: String? = "foo"
if<caret> {
foo.length
} else null
}