Remove @RelevantJavaTypes annotation from SameLenChecker#6256
Remove @RelevantJavaTypes annotation from SameLenChecker#6256kelloggm merged 2 commits intotypetools:masterfrom
@RelevantJavaTypes annotation from SameLenChecker#6256Conversation
|
|
||
| // All the errors in this test case are disabled. They were issued when `@SameLen` was restricted | ||
| // to arrays and CharSequence, but @SameLen can be written on an arbitrary user-defined type: | ||
| // https://checkerframework.org/manual/#index-annotating-fixed-size . |
There was a problem hiding this comment.
It would be better for these errors, which are on primitive types, to be preserved: @SameLen is fine on array, CharSequences, and user-defined types, but it does not make sense on primitives.
Is there a way to use @RelevantJavaTypes to express that? Maybe it needs to be done procedurally?
There was a problem hiding this comment.
I agree that behavior is desirable. There is not a way for @RelevantJavaTypes to express that fact. We could add such a mechanism, or we could enforce the constraint procedurally. I think those belong in a different pull request than this one, which exists to unblock #6254.
There was a problem hiding this comment.
There is not a way for @RelevantJavaTypes to express that fact
Thanks for confirming. We can address it in a later PR.
No description provided.