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

future parser give weird error in trailing comma after assignment

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • PUP 3.7.2
    • Compiler
    • None

    Description

      If an assignment is made with a trailing comma, and there is an expression following the comma, the result is surprisingly a literal array followed by an expression. This in turn leads to an error of "This Array Expression" is not productive.

      $a = "hello",
      notice $a
      

      Marked as major as this means that there are conditions where the problem will not be caught (when the array constructed in error is last in a block).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henrik.lindberg Henrik Lindberg
              Kurt Wall Kurt Wall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support