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

Assignment to array element yields null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0, 1.1-beta-1
    • 1.1-beta-2
    • bytecode
    • None
    • Windows XP
      Java SE 6

    Description

      Assigning a value to an array element yields null instead of the assigned value.

      int[] a = new int[1]
      assert (a[0] = 42) == null // current behavior
      assert (a[0] = 42) == 42 // expected behavior

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            pniederw Peter Niederwieser
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: