IDEA-158693 Returning expression constantly resolving to true not flagged as constant (Constant Conditions & Expressions)

This commit is contained in:
peter
2016-07-25 18:35:39 +02:00
parent 1becc9b4ea
commit 09f208cf7e
3 changed files with 53 additions and 12 deletions
@@ -0,0 +1,12 @@
class BrokenAlignment {
boolean smth() {
if (<warning descr="Condition '2 == 2' is always 'true'"><warning descr="Condition '2 == 2' is always 'true'">2 == 2</warning></warning>) {
return true;
}
boolean b = <warning descr="Condition '3 == 3' is always 'true'">3 == 3</warning>;
return <warning descr="Condition '1 == 1' is always 'true'">1 == 1</warning>;
}
}