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

Alias types are presented with the wrong name in type mismatches

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.4.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Epic Link:
    • Story Points:
      1
    • Sprint:
      Language 2016-02-24
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      Part of not yet released feature.

      Description

      Type aliases are presented the wrong way when there is a type mismatch.
      Given:

      type MyType = Integer[42,42]
      function foo(MyType $a) {
        notice $a
      }
      notice foo(43)
      

      I expect the result to be:

      Error: Evaluation Error: Error while evaluating a Function Call, 'foo' parameter 'a' expects a MyType value, got Integer at ...
      

      But I get this instead:

      Error: Evaluation Error: Error while evaluating a Function Call, 'foo' parameter 'a' expects a TypeA value, got Integer at ...
      

      It seems that it not only got the type name wrong, but it also failed to point out that the value is 43, and not the expected 42.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support