================================================================================
basic/localProperty2
================================================================================

import "pkl:test"

foo {
  local x = 2
}

// should not be accessible
fooX = test.catch(() -> foo.x)

bar {
  local x = 3
  y = x
}

// indirectly force eval of bar.x (although it should
// already have been forced due to how snippet tests work)
barY = bar.y

// should not be accessible
barX = test.catch(() -> bar.x)

--------------------------------------------------------------------------------

(module
  (importClause
    (stringConstant))
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (modifier)
        (identifier)
        (intLiteral))))
  (lineComment)
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (propertyCallExpr
            (variableExpr
              (identifier))
            (identifier))))))
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (modifier)
        (identifier)
        (intLiteral))
      (objectProperty
        (identifier)
        (variableExpr
          (identifier)))))
  (lineComment)
  (lineComment)
  (classProperty
    (identifier)
    (propertyCallExpr
      (variableExpr
        (identifier))
      (identifier)))
  (lineComment)
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (propertyCallExpr
            (variableExpr
              (identifier))
            (identifier)))))))
