remove assignment: fix for assignment nested in expression, not statement (IDEA-123903)

This commit is contained in:
Anna Kozlova
2014-04-16 20:35:09 +02:00
parent 1471847207
commit 8cd1ee6344
3 changed files with 27 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
// "Remove redundant assignment" "true"
class A {
public static void main(String[] args) {
int x = 3 * 4;
System.out.println(x);
}
}

View File

@@ -0,0 +1,7 @@
// "Remove redundant assignment" "true"
class A {
public static void main(String[] args) {
int x = (<caret>x = 3) * 4;
System.out.println(x);
}
}