Revert: perform arithmetic operations during dfa (part of IDEA-143315) (ea61e3e9e6)

This commit is contained in:
peter
2015-11-18 16:14:35 +01:00
parent 06e65d5859
commit 2aa8b8c099
7 changed files with 19 additions and 58 deletions
@@ -1,17 +0,0 @@
class Test {
{
int a = 0;
int b = a;
System.out.println(<warning descr="Condition 'a == b' is always 'true'">a == b</warning>);
System.out.println(a - b);
}
{
int a = 1;
int b = -3;
System.out.println(<warning descr="Condition 'a == b' is always 'false'">a == b</warning>);
if (<warning descr="Condition 'a + b + 2 == 0' is always 'true'">a + b + 2 == 0</warning>) {
System.out.println("a");
}
}
}
@@ -423,11 +423,4 @@ public class DataFlowInspectionTest extends DataFlowInspectionTestCase {
public void testConstantConditionsWithAssignmentsInside() { doTest(); }
public void testIfConditionsWithAssignmentInside() { doTest(); }
public void testConstantArithmetic() {
final DataFlowInspection inspection = new DataFlowInspection();
inspection.REPORT_CONSTANT_REFERENCE_VALUES = true;
myFixture.enableInspections(inspection);
myFixture.testHighlighting(true, false, true, getTestName(false) + ".java");
}
}