mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Disable field assignments in record compact constructors
Last piece of IDEA-239088 GitOrigin-RevId: 23c467c6c525d7908922bc2ebd8928205368dff7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3e101e4fcf
commit
e027f98d6a
+8
@@ -0,0 +1,8 @@
|
||||
record WrittenFields(int x,
|
||||
int y,
|
||||
int z) {
|
||||
public WrittenFields {
|
||||
<error descr="Cannot assign a value to final variable 'x'">this.x</error> = 0;
|
||||
if (Math.random() > 0.5) <error descr="Cannot assign a value to final variable 'y'">this.y</error> = 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user