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

Array Index Operator Incorrectly Trying to Use getAt Method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.1
    • 2.4.0-rc-1
    • Compiler
    • None
    • Groovy Version: 2.2.1 JVM: 1.7.0_17 Vendor: Oracle Corporation OS: Mac OS X

    Description

      When using @CompileStatic, the compiler tries to access a byte array using the getAt method instead of using array index operators/primitives. Strangely, this only seems to happen when the array access is inside certain closures. When the byte array access happens inside a Java-style for loop, the correct code is generated.

      Attachments

        1. BadBytes.groovy
          0.4 kB
          David Clark

        Activity

          People

            Unassigned Unassigned
            davidclark David Clark
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: