Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/variables/localDelegatedProperty.kt
T
2023-05-10 14:19:25 +00:00

14 lines
300 B
Kotlin
Vendored

// FIR_IDENTICAL
// WITH_STDLIB
// ISSUE: KT-57502
import kotlin.properties.Delegates
fun test(foo: Any) {
var test by Delegates.observable(true) { property, oldValue, newValue -> }
test = foo is String
if (test) {
foo.<!UNRESOLVED_REFERENCE!>length<!> // no smartcast
}
}