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

unfold of undef should mean unfold nothing

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: PUP 3.7.5
    • Component/s: Compiler, Docs
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-03-04, Language 2015-03-18

      Description

      Currently, an unfold of undef e.g. foo(*undef) results in the function foo being called with undef as an argument. This because the current rules is "unfold of something that is not an array turns it into an array of one element before unfolding".

      It is more natural to equate an unfold of undef with an unfold of an empty array.

      Special care has to be taken when unfold is used with case and selector options since it will result in a "missing option" - this should probably be treated as an error rather than silently skipping (the same should happen when unfolding an empty array as options).

      This change requires a spec update.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              henrik.lindberg Henrik Lindberg
              QA Contact:
              Kurt Wall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support