================================================================================
listings2/wrongParent
================================================================================

import "pkl:test"

class Person {}

res1 = test.catch(() -> (5) { when (false) { 0 }; "pigeon" })
res2 = test.catch(() -> new List { when (false) { 0 }; "pigeon" })
res3 = test.catch(() -> (List()) { when (false) { 0 }; "pigeon" })
res4 = test.catch(() -> new Person { when (false) { 0 }; "pigeon" })
res5 = test.catch(() -> new ValueRenderer { when (false) { 0 }; "pigeon" })
res6 = test.catch(() -> new Mapping { when (false) { 0 }; "pigeon" })

res7 = test.catch(() -> (5) { when (false) { 0 }; "fr" + "ed" })
res8 = test.catch(() -> new List { when (false) { 0 }; "fr" + "ed" })
res9 = test.catch(() -> (List()) { when (false) { 0 }; "fr" + "ed" })
res10 = test.catch(() -> new Person { when (false) { 0 }; "fr" + "ed" })
res11 = test.catch(() -> new ValueRenderer { when (false) { 0 }; "fr" + "ed" })
res12 = test.catch(() -> new Mapping { when (false) { 0 }; "fr" + "ed" })

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

(module
  (importClause
    (stringConstant))
  (clazz
    (identifier)
    (classBody))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (objectLiteral
            (parenthesizedExpr
              (intLiteral))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (slStringLiteral))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (slStringLiteral))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (objectLiteral
            (parenthesizedExpr
              (methodCallExpr
                (identifier)
                (argumentList)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (slStringLiteral))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (slStringLiteral))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (slStringLiteral))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (slStringLiteral))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (objectLiteral
            (parenthesizedExpr
              (intLiteral))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (binaryExpr
                  (slStringLiteral)
                  (slStringLiteral)))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (binaryExpr
                  (slStringLiteral)
                  (slStringLiteral)))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (objectLiteral
            (parenthesizedExpr
              (methodCallExpr
                (identifier)
                (argumentList)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (binaryExpr
                  (slStringLiteral)
                  (slStringLiteral)))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (binaryExpr
                  (slStringLiteral)
                  (slStringLiteral)))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (binaryExpr
                  (slStringLiteral)
                  (slStringLiteral)))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (whenGenerator
                (falseLiteral)
                (objectBody
                  (objectElement
                    (intLiteral))))
              (objectElement
                (binaryExpr
                  (slStringLiteral)
                  (slStringLiteral))))))))))
