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

14 lines
240 B
Kotlin
Vendored

// !LANGUAGE: +SoundSmartCastsAfterTry
fun bar(arg: Any?) = arg
fun foo() {
var s: String?
s = null
try {
s = "Test"
} catch (ex: Exception) {}
bar(s)
if (s != null) { }
s<!UNSAFE_CALL!>.<!>hashCode()
}