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

ArrayIndexOutOfBounds when calling super method in SKIP @CompileStatic section

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.6
    • Fix Version/s: 2.1.0-rc-2, 2.0.7
    • Component/s: Static compilation
    • Labels:
      None

      Description

      The following code would produce an ArrayIndexOutOfBounds, due to missing call site array:

      import groovy.transform.CompileStatic
      import groovy.transform.TypeCheckingMode
      @CompileStatic
      class Top {
          public int foo() { 123 }
      }
      @CompileStatic
      class Bottom extends Top {
          @CompileStatic(TypeCheckingMode.SKIP)
          public int bar() {
              foo()
          }
      }
      def obj = new Bottom()
      assert obj.bar() == 123
      

        Attachments

          Activity

            People

            • Assignee:
              melix Cédric Champeau
              Reporter:
              melix Cédric Champeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: