Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.fir.kt
T
2020-01-22 14:49:22 +03:00

14 lines
222 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.hashCode()
}