Ease field initialization check

Since there is already VAL_REASSIGNMENT diagnostics, we can safely only
for direct assignments.
 #KT-40893 Fixed
This commit is contained in:
Ilmir Usmanov
2020-08-06 17:38:54 +02:00
parent 6c0abe7e48
commit b403b63f48
10 changed files with 73 additions and 5 deletions
@@ -71,13 +71,13 @@ class Test1 {
<!VAL_REASSIGNMENT!>a<!> += "allowed"
}
crossinlineMe {
<!CAPTURED_VAL_INITIALIZATION, VAL_REASSIGNMENT!>b<!> += "not allowed"
<!VAL_REASSIGNMENT!>b<!> += "not allowed"
}
noinlineMe {
<!CAPTURED_VAL_INITIALIZATION, VAL_REASSIGNMENT!>c<!> += "not allowed"
<!VAL_REASSIGNMENT!>c<!> += "not allowed"
}
notinline {
<!CAPTURED_VAL_INITIALIZATION, VAL_REASSIGNMENT!>d<!> += "not allowed"
<!VAL_REASSIGNMENT!>d<!> += "not allowed"
}
}
}