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

A puppet function declaration must be a top level construct

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 4.3.2
    • None
    • None
    • 1
    • Language 2016-01-13
    • Bug Fix
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support