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

Type mismatch describer should expand aliases

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.4.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      Language 2016-03-09, Language 2016-03-23
    • Release Notes:
      New Feature
    • Release Notes Summary:
      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support