[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
This commit is contained in:
committed by
Space Team
parent
e87a064cdd
commit
02e327277e
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
// 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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user