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

array index variable unboxing not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.8, 2.4.0-beta-4
    • 2.3.9, 2.4.0-rc-1
    • Static Type Checker
    • None

    Description

      giving this code to the static type checker

          Integer i = 0
          int[] a = [0]
          a[i] = 1
      

      fails on the array access part with

      [Static type checking] - Cannot find matching method [I#getAt(java.lang.Integer). Please check if the declared type is right and if the method exists.

      this code should be legal though

      Attachments

        Activity

          People

            melix Cédric Champeau
            blackdrag Jochen Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: