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

A puppet function declaration must be a top level construct

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.3.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2016-01-13
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      It was possible to illegally define a function inside a class or user defined type without getting an error. Now an error is raised.

      Description

      It's currently possible to write:

      class foo {
        function bar() {
        }
      }
      

      This should not be possible since a function is a top level construct.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support