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

ArrayIndexOutOfBounds when calling super method in SKIP @CompileStatic section

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.6
    • 2.1.0-rc-2, 2.0.7
    • Static compilation
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: