IDEA-238099 - moved test cases to an appropriate place, fixed an error which could lead to unexpected element deletion

GitOrigin-RevId: f79de804e604675868d58715b65fd291da8e5483
This commit is contained in:
Ilyas Selimov
2020-05-21 15:25:59 +03:00
committed by intellij-monorepo-bot
parent 2cce738f33
commit 80ee8725fd
6 changed files with 18 additions and 47 deletions
@@ -0,0 +1,12 @@
// "Remove redundant assignment" "true"
class Foo {
int sent;
void bar(int begin) {
int current;
sent = begin - 1;
current = Math.abs(begin);
System.out.println(sent);
System.out.println(current);
}
}
@@ -0,0 +1,10 @@
// "Remove redundant assignment" "true"
class Foo {
void bar(int begin) {
int current;
int sent = begin - 1;
current = Math.abs(begin);
System.out.println(sent);
System.out.println(current);
}
}
@@ -0,0 +1,12 @@
// "Remove redundant assignment" "true"
class Foo {
int sent;
void bar(int begin) {
int current;
sent = <caret>current = begin - 1;
current = Math.abs(begin);
System.out.println(sent);
System.out.println(current);
}
}
@@ -0,0 +1,10 @@
// "Remove redundant assignment" "true"
class Foo {
void bar(int begin) {
int current;
int sent = <caret>current = begin - 1;
current = Math.abs(begin);
System.out.println(sent);
System.out.println(current);
}
}