Details
Description
When compiling this code with Groovy 1.7.3:
class One {
/*\u00E9*/ Stack<F> plates;
}
I get the following error message:
$ groovy One.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/private/tmp/One.groovy: 2: unable to resolve class F
@ line 2, column 15.
/*\u00E9*/ Stack<F> plates;
^
1 error
I would expect the ^ to be under the 'F'. It appears that the unicode sequence is being considered a single character, rather than 6 characters.
Issue Links
- is depended upon by
-
GRECLIPSE-805
Unicode characters cause source locations to be off in Groovy editor
-
-
GRECLIPSE-852
Groovy Test will not run in plugin versions higher than 2.0.0
-
-
GRECLIPSE-896
JUnit Tests not found when defining final string with unicode character
-
I believe that at least part of the problem comes from org.codehaus.groovy.antlr.UnicodeEscapingReader, where an escape sequence is translated into a single character. But, I think there is also a problem with the GroovyRecognizer in that it creates source locations based on the translated escape sequences, rather than the raw text.
Please note that this problem is much bigger for Groovy-Eclipse since it is reliant on precise source locations in order to get editor operations (like content assist and underlining) working.