framework/tests/value-ignore-range-overflow/Index117.java
raw| 1 | import org.checkerframework.common.value.qual.*; |
| 2 | |
| 3 | public class Index117 { |
| 4 | |
| 5 | public static void foo(boolean includeIndex, String[] roots) { |
| 6 | @IntRange(from = 2, to = Integer.MAX_VALUE) int x = (includeIndex ? 2 : 1) * roots.length + 2; |
| 7 | @IntRange(from = 2, to = Integer.MAX_VALUE) int y = 2 * roots.length + 2; |
| 8 | @IntRange(from = 2, to = Integer.MAX_VALUE) int z = roots.length + 2; |
| 9 | @IntRange(from = 2, to = 2) int w = 0 + 2; |
| 10 | } |
| 11 | } |