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

List range/collection access inconsistency

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0.8, 2.1.3
    • None
    • groovy-jdk
    • 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

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

              Dates

                Created:
                Updated: