IDEA-230315 Control flow for record compact constructor should take into account implicit assignments

GitOrigin-RevId: 31f268e2ffdb4a2d4d42288e5075e1eb52f4c137
This commit is contained in:
Tagir Valeev
2020-01-09 11:32:03 +00:00
committed by intellij-monorepo-bot
parent 68b8819558
commit 10b86fbc30
4 changed files with 52 additions and 0 deletions
@@ -0,0 +1,6 @@
// "Remove redundant assignment" "true"
record R2(int y) {
public R2 {
this.y = y;
}
}
@@ -0,0 +1,6 @@
// "Remove redundant assignment" "false"
record R(int x) {
R {
<caret>x = x + 1;
}
}
@@ -0,0 +1,7 @@
// "Remove redundant assignment" "true"
record R2(int y) {
public R2 {
this.y = y;
<caret>y = y + 1;
}
}