Java inspection: In "Join Declaration and Assignment" intention action warn about side effects of the initializer being removed (IDEA-157727)

This commit is contained in:
Pavel Dolgov
2016-06-27 15:37:13 +03:00
parent 33d171e679
commit 10c335b44e
4 changed files with 34 additions and 8 deletions
@@ -0,0 +1,11 @@
// "Join declaration and assignment" "true"
class T {
{
foo(1);
int a = foo(2);
}
static int foo(int n) {
System.out.println(n);
return n + 1;
}
}
@@ -0,0 +1,11 @@
// "Join declaration and assignment" "true"
class T {
{
int a =<caret> foo(1);
a = foo(2);
}
static int foo(int n) {
System.out.println(n);
return n + 1;
}
}