Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5658

Disallow numeric ranges where from > to

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 3.8.5, PUP 4.3.2
    • None
    • None
    • 1
    • Language 2016-01-13
    • Bug Fix
    • Hide
      Range sub-type declarations for Integer and and Float types used to accept maximum limit first and minimum second. Now for declarations this sort:
      'Integer[a, b]', a must not be greater than b.
      Show
      Range sub-type declarations for Integer and and Float types used to accept maximum limit first and minimum second. Now for declarations this sort: 'Integer[a, b]', a must not be greater than b.

    Description

      An integer type can be declared as Integer[10,0] or Integer[0,10]. The intention was to give the type a sense of direction which then would affect iterating over the range. This design has been rejected since the direction has no bearing on the constraint. The descending iteration aspect will be covered in a coming release where an Iterable type is introduced.

      This, in combination with that the current implementation has a bug that turns descending iteration into an ascending iteration (see PUP-5648) made us decide to change the current behavior so that any construct for a Numeric where the range is declared with from > to should yield an error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thomas.hallgren Thomas Hallgren
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support