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

List range/collection access inconsistency

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.8, 2.1.3
    • Fix Version/s: None
    • Component/s: groovy-jdk
    • Labels:
      None

      Description

      def l = [0,1,2]
      assert l[0,1,2,3] == [0,1,2,null]
      assert l[0..3] == [0,1,2,null]
      

      the second assertion currently breaks, denoting an inconsistency in the usage of collection indexes vs. ranges.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                asteingress Andre Steingress
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: