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

Type mismatch describer should expand aliases

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 4.4.0
    • None
    • None
    • 2
    • Language 2016-03-09, Language 2016-03-23
    • New Feature
    • Type mismatches where the type is a type alias are now expanded to make it easier to figure out what is wrong.

    Description

      When a type mismatch occurs against a type alias, the type alias is reported as expected, and then the value is shown. This means that it is hard for the user to understand what is wrong without searching for documentation of that type alias.

      The type mismatch explainer needs to include the alias expansion.

      type OhDeer = Enum[rudolph, dasher,  dancer, prancer, vixen, comet, cupid, dunder, blixem,]
      function pull_sled(OhDeer $a_deer) { }
      pull_sled('blixen')
      

      If you, like most, do not remember all of Santa's raindeers, you need to see the enum expanded to learn how to spell 'blixem'

      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