You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import org.checkerframework.checker.determinism.qual.PolyDet;
public class TestLoopVar {
static void test(@PolyDet int cnt) {
for (int i = 0; i < cnt; i++) {
@PolyDet String s1 = String.format("Instruction %d:\n", i);
}
for (@PolyDet int j = 0; j < cnt; j++) {
@PolyDet String s1 = String.format("Instruction %d:\n", j);
}
}
}
Running the determinism checker with the command 'javac -processor determinism checker/tests/determinism/TestLoopVar' results in the following error incorrectly:
Consider the test case:
Running the determinism checker with the command 'javac -processor determinism checker/tests/determinism/TestLoopVar' results in the following error incorrectly:
However, the checker doesn't show the error in the second
for
loop (Notice that the type of variablej
is explicitly annotated as@PolyDet
).The text was updated successfully, but these errors were encountered: