Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4378

Incorrect handling of unicode escape sequences when calculating source locations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8-rc-2, 1.7.9
    • None
    • None

    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.

      Attachments

        1. GROOVY-4378.patch
          14 kB
          Andrew Eisenberg
        2. unicode.patch
          3 kB
          Jochen Theodorou

        Activity

          People

            blackdrag Jochen Theodorou
            werdna Andrew Eisenberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: