================================================================================
api/xmlRendererInline3.xml
================================================================================

import "pkl:xml"
import "pkl:test"

local pigeon = new {
  name = "Pigeon"
  age = 42
}

res1 = (xml.Element("pigeon2")) { xml.Inline(pigeon) }

res2 = test.catch(() -> output.renderer.renderValue(
  new Dynamic { x = xml.Inline((xml.Element("pigeon2")) { pigeon }) }))

res3 = test.catch(() -> output.renderer.renderValue(
  new Dynamic { x = xml.Inline(xml.Inline(pigeon)) }))

output {
  renderer = new xml.Renderer {}
}

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

(module
  (importClause
    (stringConstant))
  (importClause
    (stringConstant))
  (classProperty
    (modifier)
    (identifier)
    (newExpr
      (objectBody
        (objectProperty
          (identifier)
          (slStringLiteral))
        (objectProperty
          (identifier)
          (intLiteral)))))
  (classProperty
    (identifier)
    (objectLiteral
      (parenthesizedExpr
        (methodCallExpr
          (variableExpr
            (identifier))
          (identifier)
          (argumentList
            (slStringLiteral))))
      (objectBody
        (objectElement
          (methodCallExpr
            (variableExpr
              (identifier))
            (identifier)
            (argumentList
              (variableExpr
                (identifier))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (methodCallExpr
            (propertyCallExpr
              (variableExpr
                (identifier))
              (identifier))
            (identifier)
            (argumentList
              (newExpr
                (type
                  (qualifiedIdentifier
                    (identifier)))
                (objectBody
                  (objectProperty
                    (identifier)
                    (methodCallExpr
                      (variableExpr
                        (identifier))
                      (identifier)
                      (argumentList
                        (objectLiteral
                          (parenthesizedExpr
                            (methodCallExpr
                              (variableExpr
                                (identifier))
                              (identifier)
                              (argumentList
                                (slStringLiteral))))
                          (objectBody
                            (objectElement
                              (variableExpr
                                (identifier))))))))))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (methodCallExpr
            (propertyCallExpr
              (variableExpr
                (identifier))
              (identifier))
            (identifier)
            (argumentList
              (newExpr
                (type
                  (qualifiedIdentifier
                    (identifier)))
                (objectBody
                  (objectProperty
                    (identifier)
                    (methodCallExpr
                      (variableExpr
                        (identifier))
                      (identifier)
                      (argumentList
                        (methodCallExpr
                          (variableExpr
                            (identifier))
                          (identifier)
                          (argumentList
                            (variableExpr
                              (identifier)))))))))))))))
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (identifier)
        (newExpr
          (type
            (qualifiedIdentifier
              (identifier)
              (identifier)))
          (objectBody))))))
