panacekcz / checker-framework

Pluggable type-checking for Java
http://checkerframework.org/
Other
0 stars 0 forks source link

Upper bounds for java.util.regex.Matcher #13

Open panacekcz opened 7 years ago

panacekcz commented 7 years ago

The indices returned from start and end should be IndexOrHigh for the input sequence. Could be solved by creating an annotation @MatcherFor("s") for the matcher variable. However the input sequence can be changed by reset, making this non-trivial.

panacekcz commented 7 years ago

To be sound @MatcherFor would have to prohibit changing the input for the matcher. Also it should not be convertible to an unannotated Matcher.