mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Don't create parameters for effectively local variables in extracted fragment (IDEA-180864)
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
public class EffectivelyLocalWithinExpression {
|
||||
void foo() {
|
||||
int n;
|
||||
if (newMethod(0)) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean newMethod(int i) {
|
||||
int n;
|
||||
return (n = z()) > i && n < 100;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
int n;
|
||||
if (newMethod(1)) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
int z() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user