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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 4.5.0
    • None
    • None
    • 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]]'
    • 1
    • Language 2016-04-20
    • Bug Fix
    • 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

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support