blob: b2ab086e61ee1593c6e7144cd692f3ee49790987 [file] [log] [blame]
@SuppressWarnings("lowerbound")
public class Dimension {
void test(int expr) {
int[] array = new int[expr];
// :: error: (array.access.unsafe.high)
array[expr] = 0;
array[expr - 1] = 0;
}
String[] arrayField = new String[1];
void test2(int expr) {
arrayField = new String[expr];
// :: error: (array.access.unsafe.high)
this.arrayField[expr] = "";
this.arrayField[expr - 1] = "";
}
}