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

No error on duplicate parameters on classes and resources

    Details

    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-12-16, Language 2015-12-30
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      This adds an error if a parameter is specified more than once for a class or resource.

      Description

      I think that the following is a bug:

      class test (
        $a = 'first',
        $a = 'second',
      ) {
        notice($a)
      }
       
      include test
      

      results in:

      Notice: Scope(Class[Test]): second
      

      If two parameters with the same name are added to a class or resource an error should be thrown in my opinion. This would also solve the problem, that this looks like it violates the no reassignment rule.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vicinus Reinhard Vicinus
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support