Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.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

14 lines
285 B
Kotlin
Vendored

// !DUMP_CFG
class B(p0: String) {
val p1 = p0
val p2: Int = p0.length
var p3: String
constructor(p0: String, p1: String) : this(p0) {
p3 = p1
}
init {
<!VAL_REASSIGNMENT!>p1<!> = <!ASSIGNMENT_TYPE_MISMATCH!>p0.length<!>
p3 = ""
}
}