mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
LocalsOrMyInstanceFieldsControlFlowPolicy#isLocalOrMyInstanceReference extracted
Fixes parentheses handling like (this).x. Review ID: IDEA-CR-33345
This commit is contained in:
+10
@@ -251,4 +251,14 @@ class QualifiedThis {
|
||||
<error descr="Cannot assign a value to final variable 'x'">QualifiedThis.this.x</error> = 5;
|
||||
this.x = 5;
|
||||
}
|
||||
}
|
||||
|
||||
class ParenthesizedThis {
|
||||
final int x;
|
||||
final int y = (this).x + 1; // allowed as qualifier is not naked 'this'!
|
||||
|
||||
ParenthesizedThis() {
|
||||
<error descr="Cannot assign a value to final variable 'x'">(this).x</error> = 5;
|
||||
this.x = 6;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user