File: RawInt2.java

package info (click to toggle)
checker-framework-java 3.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,840 kB
  • sloc: java: 145,910; xml: 839; sh: 518; makefile: 401; perl: 26
file content (18 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public abstract class RawInt2 {

    public void compare(MyVarInfo vi1, MyVarInfo vi2) {

        int name1in2 = 1;
        int name2in1 = 2;
        int cmp1 = (name1in2 == -1) ? 0 : vi1.varinfo_index - 1;
        // Removing this line eliminates the error, even though cmp2 is not used
        int cmp2 = false ? 0 : 15;
        sign(cmp1);
    }

    public void sign(int x) {}
}

final class MyVarInfo {
    public int varinfo_index = 22;
}