On 13.05.24 16:16, o...@ocs.cz wrote: [...]
2074 ocs /tmp> <q.groovy def all=['hi','there'].findAll { it.startsWith('h')) } 2075 ocs /tmp> /usr/local/groovy-4.0.18/bin/groovy q org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: /private/tmp/q.groovy: 1: Unexpected input: '{' @ line 1, column 32. def all=['hi','there'].findAll { it.startsWith('h')) } ^ 1 error 2076 ocs /tmp> ===
I assume the problem is the )) for the startsWith. The parser backtracks because there is no opening ( for the closing one and then finds that { can't be a valid input here. Could you please make an issue for this? We should look into how we can improve this bye Jochen