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

continued shorthand interpolation of numeric variable fails (future parser)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: PUP 3.7.5
    • Component/s: Compiler
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-02-18

      Description

      When attempting to interpolate like this:

      notice "${0[foo]}"
      

      The error message is

      Illegal expression. A Variable is unacceptable as name in a Variable
      

      It should have been

      Operator '[]' is not applicable to a Nil Object.
      

      (Which BTW should be fixed to say 'undef' instead of Nil Object).

      The cause of the problem is that the shorthand notation misunderstands a numeric variable (it understands a variable name just fine even if it is undefined).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              henrik.lindberg Henrik Lindberg
              QA Contact:
              Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support