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

Reduce inferred Variant[T] to T in inference of Array and Hash

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.5.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      That notice([1,2,3].reverse_each), outputs 'Iterator[Integer]' instead of 'Iterator[Variant[Integer]]'

      Show
      That notice([1,2,3].reverse_each) , outputs 'Iterator[Integer]' instead of 'Iterator[Variant[Integer]]'
    • Story Points:
      1
    • Sprint:
      Language 2016-04-20
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Error messages and other output of data type information could sometimes display a Variant type having only a single variant. While correct, this verbose output is now reduced to that single type.

      Description

      PUP-6151 shows an example where the output of an Iterator shows the type of the iterator as Iterator[Variant[Integer]] - in cases where the result is a single T in the Variant it should be reduced to just T.

      (This may be the same for Array and Hash - which the type inference is most likely obtained from in the Iterator case).

      The extra (meaningless) wrapping only causes users some extra head scratching.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: