More on comparison that is always false due to being out of type range on implicit type conversion (IDEA-124210)

This commit is contained in:
peter
2014-04-22 14:34:31 +02:00
parent b6bccb78e0
commit 0bd06e5e39
2 changed files with 10 additions and 2 deletions
@@ -470,10 +470,12 @@ public class StandardInstructionVisitor extends InstructionVisitor {
}
if (opSign == LT && constantValue <= minValue) return alwaysFalse(instruction, runner, memState);
if ((opSign == LT || opSign == LE) && constantValue > maxValue) return alwaysTrue(instruction, runner, memState);
if (opSign == LT && constantValue > maxValue) return alwaysTrue(instruction, runner, memState);
if (opSign == LE && constantValue >= maxValue) return alwaysTrue(instruction, runner, memState);
if (opSign == GT && constantValue >= maxValue) return alwaysFalse(instruction, runner, memState);
if ((opSign == GT || opSign == GE) && constantValue < minValue) return alwaysTrue(instruction, runner, memState);
if (opSign == GT && constantValue < minValue) return alwaysTrue(instruction, runner, memState);
if (opSign == GE && constantValue <= minValue) return alwaysTrue(instruction, runner, memState);
return null;
}