[ https://issues.apache.org/jira/browse/GROOVY-6220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082380#comment-15082380 ]
Paul King commented on GROOVY-6220: ----------------------------------- I imagine this will be easier to try to resolve once we move to Antlr 4. > Compiler gives very cryptic error messages for unterminated regexes > ------------------------------------------------------------------- > > Key: GROOVY-6220 > URL: https://issues.apache.org/jira/browse/GROOVY-6220 > Project: Groovy > Issue Type: Bug > Components: Compiler > Affects Versions: 1.8.6, 2.4.5 > Environment: Used with Gradle 1.6 on Windows XP. > Reporter: Tomas Lycken > Priority: Minor > Attachments: SillyClass.groovy, build.gradle > > > When a Groovy class file has an unterminated regex somewhere, the compiler > states that there is an invalid character 0xFFFF at the end of the file, > rather than pointing at the unterminated regex. > MWE (also attached) > package silly > public class SillyClass { > public SillyClass() { > println "testString".replaceAll(/\B[A-Z]) { it.toLowerCase() } > } > } > Compiler error: > <project path...>\src\main\groovy\silly\SillyClass.groovy: 9: unexpected > char: 0xFFFF @ line 9, column 1. > 1 error > If this error is fixed in a later Groovy release, please let me know so I can > file an issue with Gradle to update =) -- This message was sent by Atlassian JIRA (v6.3.4#6332)