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

ResourceExpression has incorrect offset when inside of an else block

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.2.0
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Team:
      Platform Core
    • Story Points:
      1
    • Sprint:
      Platform Core 2017-08-22, Coremunity Hopper
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Reported position in source code could be wrong after internal optimization of a code block with single expression. This is now fixed.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      Covered by spec test

      Description

      The example used to create this failure is below. The service resource has an offset of 34, which is actually the start of the else keyword. It should be 45.

      class firewall {
        if(true) {
        } else {
          service { 'service':
            ensure    => running
          }
        }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              qa qa
              Reporter:
              austin.blatt Austin Blatt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support