mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Don't introduce parameter for potentially matching fields if the fields are written - improved (IDEA-182284)
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
class DecrementDifferentInnerFieldsDuplicate {
|
||||
class C {
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
|
||||
private void foo(C a, C b) {
|
||||
<selection>
|
||||
if (a.x > 0) {
|
||||
bar(a.x);
|
||||
a.x--;
|
||||
}</selection>
|
||||
|
||||
if (b.y > 0) {
|
||||
bar(b.y);
|
||||
b.y--;
|
||||
}
|
||||
}
|
||||
|
||||
private void bar(int i) { }
|
||||
}
|
||||
Reference in New Issue
Block a user