DFA instruction visitor refactoring wave#5 fixes

ResultOfInstruction
This commit is contained in:
Tagir Valeev
2018-06-25 15:48:10 +07:00
parent 3d241e6410
commit a4a84553e4
12 changed files with 92 additions and 9 deletions
@@ -0,0 +1,9 @@
import java.util.List;
class Test {
void test(String type) {
if(type != null && (type.equals("foo") | type.equals("bar"))) {
System.out.println("Who knows");
}
}
}
@@ -41,7 +41,7 @@ class S {
}
public void te5(boolean b){
Boolean c = Boolean.TRUE;
boolean o = <warning descr="Condition 'b||c' is always 'true'">b||<warning descr="Condition 'c' is always 'true' when reached">c</warning></warning>;
boolean o = b||<warning descr="Condition 'c' is always 'true' when reached">c</warning>;
if (<warning descr="Condition 'o' is always 'true'">o</warning>) {
}
}
@@ -0,0 +1,10 @@
import java.util.List;
class Test {
void test(String type) {
boolean uint = false;
if ("int".equals(type) || (uint = "uint".equals(type))) {
System.out.println("possible");
}
}
}