Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/cfa/reassignOfNonMemberProperty_lateInitialization.kt
T
Dmitriy Novozhilov 02e327277e [FIR] Report VAL_REASSIGNMENT on assign to non-local vals
In this commit reporting on member properties in init section of class
  is not supported (see KT-55528)

^KT-55493 Fixed
2022-12-20 08:12:09 +00:00

32 lines
472 B
Kotlin
Vendored

// ISSUE: KT-55493
// WITH_STDLIB
val Some.z: String
get() = "ok"
class Some {
val x: String
val y: String
init {
x = "ok"
x = "error"
<!VAL_REASSIGNMENT!>z<!> = "error"
}
val a: String = run {
x = "error"
y = "ok"
y = "error"
<!VAL_REASSIGNMENT!>z<!> = "error"
"hello"
}
init {
x = "error"
y = "error"
<!VAL_REASSIGNMENT!>z<!> = "error"
}
}