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

reduce does not work with break()

    XMLWordPrintable

Details

    • Puppet Developer Experience
    • 1
    • PDE 2017-05-31
    • Bug Fix
    • It was not possible to call the {{break()}} function to end the iteration in a {{reduce}} lambda.
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support