The following groovy script doesn't compile
import java.util.concurrent.Callable
println "b";
Callable<String> callable = new Callable<String>()
{
String call() {
println("C");
return null;
}
};
This is the error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: C:\tmp\a.groovy: 6: Unknown type: METHOD_DEF at line: 6 column: 9. File: C:\tmp\a.groovy @ line 6, c olumn 9. String call() { ^
1 error
What is the cause and how to resolve?