Skip to content

Commit 8197f24

Browse files
committed
Update test
1 parent b947f16 commit 8197f24

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

checker/tests/index/SameLenIrrelevant.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
// Tests that adding an @SameLen annotation to a primitive type is still
22
// an error.
33

4+
// All the errors in this test case are disabled. They were issued when `@SameLen` was restricted
5+
// to arrays and CharSequence, but @SameLen can be written on an arbitrary user-defined type:
6+
// https://checkerframework.org/manual/#index-annotating-fixed-size .
7+
48
import org.checkerframework.checker.index.qual.SameLen;
59

610
public class SameLenIrrelevant {
7-
// :: error: (anno.on.irrelevant)
11+
// NO :: error: (anno.on.irrelevant)
812
public void test(@SameLen("#2") int x, int y) {
913
// do nothing
1014
}
1115

12-
// :: error: (anno.on.irrelevant)
16+
// NO :: error: (anno.on.irrelevant)
1317
public void test(@SameLen("#2") double x, double y) {
1418
// do nothing
1519
}
1620

17-
// :: error: (anno.on.irrelevant)
21+
// NO :: error: (anno.on.irrelevant)
1822
public void test(@SameLen("#2") char x, char y) {
1923
// do nothing
2024
}

0 commit comments

Comments
 (0)