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

Function dispatch taking zero arguments is incorrectly chosen

    Details

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

      A dispatch for a Puppet function written in Ruby that declares no parameters is not selected unless zero parameters are passed in a call to that function.

      Show
      A dispatch for a Puppet function written in Ruby that declares no parameters is not selected unless zero parameters are passed in a call to that function.
    • Story Points:
      1
    • Sprint:
      Language 2016-08-24, Language 2016-09-07
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      A problem with the 4.x Ruby function API was fixed. A function with a dispatch accepting zero arguments always selected the first possible dispatch irrespective of how many arguments were given in a call.
      Show
      A problem with the 4.x Ruby function API was fixed. A function with a dispatch accepting zero arguments always selected the first possible dispatch irrespective of how many arguments were given in a call.

      Description

      A Puppet function that is written in Ruby and has a dispatch that takes zero arguments will get a parameter tuple with no contents and no size. This means that the tuple is assignable from all other tuples which in turn means that the dispatch is chosen, no matter what actual parameters that was passed in the call.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                qa qa
                Reporter:
                thomas.hallgren Thomas Hallgren
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support