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

size() and iterator() not correct for an empty IntRange

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.9, 2.2.1
    • 2.2.2
    • Static compilation
    • None

    Description

      The following script fails:

      def empty = new IntRange(false, 5, 5)
      assert empty.size() == 0
      assert empty.iterator().hasNext() == false
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              pledbrook Peter Ledbrook
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: