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

future parser give weird error in trailing comma after assignment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 3.7.2
    • Component/s: Compiler
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      Platform 2014-10-15

      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support