Consider the following:
void m(java.util.function.Function<String, Integer> f) {
}
@groovy.transform.CompileStatic
void test() {
m(Object::sleep)
}
The method reference Object::sleep is not a match for the functional interface Function<String,Integer>. The compiler currently throws NPE within StaticTypesMethodReferenceExpressionWriter for this case.

Consider the following:
The method reference
Object::sleepis not a match for the functional interfaceFunction<String,Integer>. The compiler currently throws NPE withinStaticTypesMethodReferenceExpressionWriterfor this case.