Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setSameInTry.kt
T

11 lines
246 B
Kotlin
Vendored

// !LANGUAGE: +SoundSmartCastsAfterTry
fun foo() {
var s: String?
s = "Test"
try {
s = "Other"
} catch (ex: Exception) {}
// Problem: here we do not see that 's' is always not-null
s<!UNSAFE_CALL!>.<!>hashCode()
}