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

Number.step incorrectly believes there is an infinite loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.2, 1.8-beta-1
    • groovy-jdk
    • None

    Description

      recently i noticed that an exception is thrown with something like
      0.step 0, 10, {}

      i checked the dgm (version 1.7.0 i think) and found that self and to equality is never considered as a possibility.

      i believe it should just do nothing like, say
      (0..<0).step 10, {}
      or
      for (int i=0; i<0; i++) {}

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            jpertino Pertino Juan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: