Skip to content

Commit

Permalink
Test case for issue typetools#3281
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Sep 26, 2020
1 parent d15458f commit ffed774
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions checker/tests/regex/Issue3281.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Test case for Issue 3281:
// https://github.com/typetools/checker-framework/issues/3281

// @skip-test until the bug is fixed

import org.checkerframework.checker.regex.RegexUtil;
import org.checkerframework.checker.regex.qual.Regex;

Expand All @@ -10,24 +12,20 @@ public class Issue3281 {

public boolean b = false;

/*
void m1(String s) {
if (true) {
// :: error: (argument.type.incompatible)
Pattern.compile(s);
}
}
*/

/*
void m2(String s) {
RegexUtil.isRegex(s);
if (true) {
// :: error: (argument.type.incompatible)
Pattern.compile(s);
}
}
*/

void m2f(String s) {
RegexUtil.isRegex(s);
Expand All @@ -37,22 +35,18 @@ void m2f(String s) {
}
}

/*
void m3(String s) {
if (RegexUtil.isRegex(s)) {
Pattern.compile(s);
}
}
*/

/*
void m4(String s, String s2) {
RegexUtil.isRegex(s);
if (RegexUtil.isRegex(s2)) {
Pattern.compile(s);
}
}
*/

void m4f(String s, String s2) {
RegexUtil.isRegex(s);
Expand Down

0 comments on commit ffed774

Please sign in to comment.