mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
Revert: perform arithmetic operations during dfa (part of IDEA-143315) (ea61e3e9e6)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user