Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt443.fir.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

15 lines
264 B
Kotlin
Vendored

// KT-443 Write allowed to super.val
open class M() {
open val b: Int = 5
}
class N() : M() {
val a : Int
get() {
super.<!VAL_REASSIGNMENT!>b<!> = super.b + 1
return super.b + 1
}
override val b: Int = a + 1
}