mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
Error is reported when qualified this is used to initialize a final variable
Fixes IDEA-191686 Bad code is green (cannot assign a value to final variable)
This commit is contained in:
+9
@@ -243,3 +243,12 @@ class AssignmentInUnreachablePolyadic {
|
||||
else if (true && (<error descr="Variable 'bbbb' might already have been assigned to">bbbb</error> = false)) ;
|
||||
}
|
||||
}
|
||||
|
||||
class QualifiedThis {
|
||||
final int x;
|
||||
|
||||
QualifiedThis() {
|
||||
<error descr="Cannot assign a value to final variable 'x'">QualifiedThis.this.x</error> = 5;
|
||||
<error descr="Variable 'x' might already have been assigned to">this.x</error> = 5;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user