Files
kotlin-fork/idea/testData/quickfix/wrapWithSafeLetCall/wrapAllNonNullablePositions1.kt
T
2021-05-21 00:01:20 +02:00

11 lines
331 B
Kotlin
Vendored

// "Wrap with '?.let { ... }' call" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
// ERROR: Type mismatch: inferred type is String? but String was expected
// WITH_RUNTIME
fun test(s: String?) {
nullable(nullable(notNull(notNull(<caret>s))))
}
fun notNull(name: String): String = name
fun nullable(name: String?): String = ""