silly assignment: ignore non-trivial casts involving primitives (IDEA-146830)

This commit is contained in:
Anna Kozlova
2015-10-27 19:35:20 +01:00
parent 40db0beb8d
commit e27c654b20
3 changed files with 29 additions and 6 deletions
@@ -21,6 +21,9 @@ class a {
<warning descr="Variable 'i' is assigned to itself">i = i</warning>;
<warning descr="Variable 'i' is assigned to itself">i = (int)i</warning>;
<warning descr="Variable 'o' is assigned to itself">o = ((Object)(o))</warning>;
Object o1 = <warning descr="Variable 'o' is assigned to itself">o = ((Object)(o))</warning>;
System.out.println(o1);
o = (double)o;
}
void f4() {
fpanel.getSize().height = this.fpanel.getSize().height; // not silly. Are you sure you can bet getSize() has no side effects?