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

reduce does not work with break()

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-05-31
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      It was not possible to call the {{break()}} function to end the iteration in a {{reduce}} lambda.
    • QA Risk Assessment:
      No Action

      Description

      It is not possible to call break() from within a reduce function. The result is an error stating that

      Error: break() from context where this is illegal
      

      This is because the handling of the StopIteration required is missing in the implementation of reduce.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            henrik.lindberg Henrik Lindberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support