[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
+1
-1
@@ -26,7 +26,7 @@ class Case1() {
|
||||
|
||||
fun case2() {
|
||||
var b= Case2()
|
||||
--b.a
|
||||
--b.<!VAL_REASSIGNMENT!>a<!>
|
||||
}
|
||||
|
||||
class Case2() {
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class Case1() {
|
||||
|
||||
fun case2() {
|
||||
var b= Case2()
|
||||
++b.a
|
||||
++b.<!VAL_REASSIGNMENT!>a<!>
|
||||
}
|
||||
|
||||
class Case2() {
|
||||
|
||||
+6
-6
@@ -7,8 +7,8 @@
|
||||
*/
|
||||
fun case1() {
|
||||
val x : Case1? = Case1()
|
||||
x.x = "0"
|
||||
x?.x = "0"
|
||||
x.<!VAL_REASSIGNMENT!>x<!> = "0"
|
||||
x?.<!VAL_REASSIGNMENT!>x<!> = "0"
|
||||
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ class Case1{
|
||||
*/
|
||||
fun case2() {
|
||||
val x : Case2? = Case2(null)
|
||||
x.x = "0"
|
||||
x?.x = "0"
|
||||
x.<!VAL_REASSIGNMENT!>x<!> = "0"
|
||||
x?.<!VAL_REASSIGNMENT!>x<!> = "0"
|
||||
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ class Case2(val x: Any?) {}
|
||||
*/
|
||||
fun case3() {
|
||||
val x : Case3? = Case3()
|
||||
x.x = "0"
|
||||
x?.x = "0"
|
||||
x.<!VAL_REASSIGNMENT!>x<!> = "0"
|
||||
x?.<!VAL_REASSIGNMENT!>x<!> = "0"
|
||||
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user