blob: 751c02ff0f47bf2aaf854db668a16399922596a8 [file] [log] [blame]
import org.checkerframework.dataflow.qual.*;
interface PureFunc {
@Pure
String doNothing();
}
class TestPure {
static String myMethod() {
return "";
}
@Pure
static String myPureMethod() {
return "";
}
void context() {
PureFunc f1 = TestPure::myPureMethod;
// :: error: (purity.methodref)
PureFunc f2 = TestPure::myMethod;
}
}