================================================================================
generators/entryGeneratorsTyped
================================================================================

import "pkl:test"

res1 = new Mapping {
  for (n: Int in IntSeq(1, 5)) {
    when (n.isOdd) {
      [n * 2] = n * 2
    }
  }
}

res1b = test.catch(() -> new Mapping {
  for (n: String in IntSeq(1, 5)) {
    when (n.isOdd) {
      [n * 2] = n * 2
    }
  }
})

res1c = new Mapping {
  for (i: Int, n: Int in IntSeq(1, 5)) {
    when (n.isOdd) {
      [i * n] = i * n
    }
  }
}

res1d = test.catch(() -> new Mapping {
  for (i: Int, n: String in IntSeq(1, 5)) {
    when (n.isOdd) {
      [i * n] = i * n
    }
  }
})

res2 = new Dynamic {
  for (n: Number in List(1, 2, 3, 4, 5)) {
    when (n.isOdd) {
      [n * 2] = n * 2
    }
  }
}

res2b = test.catch(() -> new Dynamic {
  for (n: Number in List(1, 2, "other", 4, 5)) {
    when (n.isOdd) {
      [n * 2] = n * 2
    }
  }
})

res2c = new Dynamic {
  for (i: Number, n: Number in List(1, 2, 3, 4, 5)) {
    when (n.isOdd) {
      [i * n] = i * n
    }
  }
}

res2d = test.catch(() -> new Dynamic {
  for (i: Number, n: Number in List(1, 2, "other", 4, 5)) {
    when (n.isOdd) {
      [i * n] = i * n
    }
  }
})

res6 = new Mapping {
  for (x: Any in List("a", "b", "c")) {
    for (y: String in List("e", "f")) {
      [x + y] = x + y
    }
  }
}

res6b = test.catch(() -> new Mapping {
  for (x: Any in List("a", "b", "c")) {
    for (y: String in List("e", 42)) {
      [x + y] = x + y
    }
  }
})

res6c = new Mapping {
  for (i1: Int, x: Any in List("a", "b", "c")) {
    for (i2: Number, y: String in List("e", "f")) {
      [x + y] = Pair(i1 + i2, x + y)
    }
  }
}

res6d = test.catch(() -> new Mapping {
  for (i1: Int, x: Any in List("a", "b", "c")) {
    for (i2: Number, y: String in List("e", 42)) {
      [x + y] = Pair(i1 + i2, x + y)
    }
  }
})

res7 = new Dynamic {
  ["one"] = 1
  for (n: Int in IntSeq(1, 5)) {
    when (n.isOdd) {
      [n * 2] = n * 2
    }
  }
  ["two"] = 2
  for (x: unknown in List("a", "b", "c")) {
    for (y: String in List("e", "f")) {
      [x + y] = x + y
    }
  }
  ["three"] = 3
}

res7b = test.catch(() -> new Dynamic {
  ["one"] = 1
  for (n: Int in IntSeq(1, 5)) {
    when (n.isOdd){
      [n * 2] = n * 2
    }
  }
  ["two"] = 2
  for (x: unknown in List("a", "b", "c")) {
    for (y: String in List(42, "f")) {
      [x + y] = x + y
    }
  }
  ["three"] = 3
})

// reuse same loop variable
res8 = new Mapping {
  for (n: Int in IntSeq(1, 3)) { [n] = n }
  for (n: String in List("a", "b", "c")) { [n] = n }
  for (n: Number in IntSeq(4, 6)) { [n] = n }
}

// reuse same loop variable
res8b = test.catch(() -> new Mapping {
  for (n: Int in IntSeq(1, 3)) { [n] = n }
  for (n: String in List(42.min, "b", "c")) { [n] = n }
  for (n: Number in IntSeq(4, 6)) { [n] = n }
})

// reuse same loop variable
res8c = new Mapping {
  for (i: Int, n: Int in IntSeq(1, 3)) { [n] = Pair(i, n) }
  for (i: Number, n: String in List("a", "b", "c")) { [n] = Pair(i, n) }
  for (i: Int, n: Number in IntSeq(4, 6)) { [n] = Pair(i, n) }
}

// reuse same loop variable
res8d = test.catch(() -> new Mapping {
  for (i: Int, n: Int in IntSeq(1, 3)) { [n] = Pair(i, n) }
  for (i: Number, n: String in List(42.min, "b", "c")) { [n] = Pair(i, n) }
  for (i: Int, n: Number in IntSeq(4, 6)) { [n] = Pair(i, n) }
})
forWithMultipleMembers = new Dynamic {
  for (ch: String in List("a", "b", "c")) {
    [ch] = ch
    [ch + "x"] = ch + "x"
    [ch + "y"] = ch + "y"
  }
}

forWithMultipleMembersNested = new Dynamic {
  for (ch: String in List("a", "b")) {
    for (k: String, v: Int in Map("x", 1, "y", 2)) {
      [ch + k + v.toString()] = ch + k + v.toString()
      [v.toString() + k + ch] = v.toString() + k + ch
    }
    for (k: String, v: Number in Map("xx", 11, "yy", 22)) {
      [ch + k + v.toString()] = ch + k + v.toString()
      [v.toString() + k + ch] = v.toString() + k + ch
    }
  }
}

whenWithMultipleMembers = new Dynamic {
  for (i: Int, n: Int in new Listing { 1; 2; 3; 4; 5 }) {
    when (n.isOdd) {
      [(i + 1) * n] = (i + 1) * n
      [(i + 1) * n * 2] = (i + 1) * n * 2
    }
  }
}

whenWithMultipleMembersNested = new Mapping {
  for (i: Int, n: Int in new Listing { 1; 2; 3; 4; 5 }) {
    when (n.isOdd) {
      when (n > 3) {
        [(i + 1) * n] = (i + 1) * n
        [(i + 1) * n * 2] = (i + 1) * n * 2
      }
    }
  }
}

whenWithElse = new Dynamic {
  for (i: Int, n: Int in new Listing { 1; 2; 3; 4; 5 }) {
    when (n.isOdd) {
      [(i + 1) * n] = (i + 1) * n
      [(i + 1) * n * 2] = (i + 1) * n * 2
    } else {
      [((i + 1) * n).toString()] = ((i + 1) * n).toString()
      [((i + 1) * n * 2).toString()] = ((i + 1) * n * 2).toString()
    }
  }
}

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

(module
  (importClause
    (stringConstant))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (intLiteral))
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (intLiteral))))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (whenGenerator
                    (propertyCallExpr
                      (variableExpr
                        (identifier))
                      (identifier))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral))
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral)))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (whenGenerator
                    (propertyCallExpr
                      (variableExpr
                        (identifier))
                      (identifier))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier)))
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier))))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)
              (intLiteral)
              (intLiteral)
              (intLiteral)))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (intLiteral))
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (intLiteral))))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)
                    (slStringLiteral)
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (whenGenerator
                    (propertyCallExpr
                      (variableExpr
                        (identifier))
                      (identifier))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral))
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral)))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)
              (intLiteral)
              (intLiteral)
              (intLiteral)))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)
                    (slStringLiteral)
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (whenGenerator
                    (propertyCallExpr
                      (variableExpr
                        (identifier))
                      (identifier))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier)))
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier))))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (slStringLiteral)
              (slStringLiteral)
              (slStringLiteral)))
          (objectBody
            (forGenerator
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (methodCallExpr
                (identifier)
                (argumentList
                  (slStringLiteral)
                  (slStringLiteral)))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (slStringLiteral)
                    (slStringLiteral)
                    (slStringLiteral)))
                (objectBody
                  (forGenerator
                    (typedIdentifier
                      (identifier)
                      (typeAnnotation
                        (type
                          (qualifiedIdentifier
                            (identifier)))))
                    (methodCallExpr
                      (identifier)
                      (argumentList
                        (slStringLiteral)
                        (intLiteral)))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier)))
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier))))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (slStringLiteral)
              (slStringLiteral)
              (slStringLiteral)))
          (objectBody
            (forGenerator
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (methodCallExpr
                (identifier)
                (argumentList
                  (slStringLiteral)
                  (slStringLiteral)))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))
                  (methodCallExpr
                    (identifier)
                    (argumentList
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))))))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (slStringLiteral)
                    (slStringLiteral)
                    (slStringLiteral)))
                (objectBody
                  (forGenerator
                    (typedIdentifier
                      (identifier)
                      (typeAnnotation
                        (type
                          (qualifiedIdentifier
                            (identifier)))))
                    (typedIdentifier
                      (identifier)
                      (typeAnnotation
                        (type
                          (qualifiedIdentifier
                            (identifier)))))
                    (methodCallExpr
                      (identifier)
                      (argumentList
                        (slStringLiteral)
                        (intLiteral)))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier)))
                        (methodCallExpr
                          (identifier)
                          (argumentList
                            (binaryExpr
                              (variableExpr
                                (identifier))
                              (variableExpr
                                (identifier)))
                            (binaryExpr
                              (variableExpr
                                (identifier))
                              (variableExpr
                                (identifier))))))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (objectEntry
          (slStringLiteral)
          (intLiteral))
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (intLiteral))
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (intLiteral)))))))
        (objectEntry
          (slStringLiteral)
          (intLiteral))
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type)))
          (methodCallExpr
            (identifier)
            (argumentList
              (slStringLiteral)
              (slStringLiteral)
              (slStringLiteral)))
          (objectBody
            (forGenerator
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (methodCallExpr
                (identifier)
                (argumentList
                  (slStringLiteral)
                  (slStringLiteral)))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier))))))))
        (objectEntry
          (slStringLiteral)
          (intLiteral)))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (objectEntry
                (slStringLiteral)
                (intLiteral))
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (whenGenerator
                    (propertyCallExpr
                      (variableExpr
                        (identifier))
                      (identifier))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral))
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral)))))))
              (objectEntry
                (slStringLiteral)
                (intLiteral))
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type)))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (slStringLiteral)
                    (slStringLiteral)
                    (slStringLiteral)))
                (objectBody
                  (forGenerator
                    (typedIdentifier
                      (identifier)
                      (typeAnnotation
                        (type
                          (qualifiedIdentifier
                            (identifier)))))
                    (methodCallExpr
                      (identifier)
                      (argumentList
                        (intLiteral)
                        (slStringLiteral)))
                    (objectBody
                      (objectEntry
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier)))
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (variableExpr
                            (identifier))))))))
              (objectEntry
                (slStringLiteral)
                (intLiteral))))))))
  (lineComment)
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)))
          (objectBody
            (objectEntry
              (variableExpr
                (identifier))
              (variableExpr
                (identifier)))))
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (slStringLiteral)
              (slStringLiteral)
              (slStringLiteral)))
          (objectBody
            (objectEntry
              (variableExpr
                (identifier))
              (variableExpr
                (identifier)))))
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)))
          (objectBody
            (objectEntry
              (variableExpr
                (identifier))
              (variableExpr
                (identifier))))))))
  (lineComment)
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (objectEntry
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))))
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (propertyCallExpr
                      (intLiteral)
                      (identifier))
                    (slStringLiteral)
                    (slStringLiteral)))
                (objectBody
                  (objectEntry
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))))
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (objectEntry
                    (variableExpr
                      (identifier))
                    (variableExpr
                      (identifier)))))))))))
  (lineComment)
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)))
          (objectBody
            (objectEntry
              (variableExpr
                (identifier))
              (methodCallExpr
                (identifier)
                (argumentList
                  (variableExpr
                    (identifier))
                  (variableExpr
                    (identifier)))))))
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (slStringLiteral)
              (slStringLiteral)
              (slStringLiteral)))
          (objectBody
            (objectEntry
              (variableExpr
                (identifier))
              (methodCallExpr
                (identifier)
                (argumentList
                  (variableExpr
                    (identifier))
                  (variableExpr
                    (identifier)))))))
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (intLiteral)
              (intLiteral)))
          (objectBody
            (objectEntry
              (variableExpr
                (identifier))
              (methodCallExpr
                (identifier)
                (argumentList
                  (variableExpr
                    (identifier))
                  (variableExpr
                    (identifier))))))))))
  (lineComment)
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (objectEntry
                    (variableExpr
                      (identifier))
                    (methodCallExpr
                      (identifier)
                      (argumentList
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))))))
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (propertyCallExpr
                      (intLiteral)
                      (identifier))
                    (slStringLiteral)
                    (slStringLiteral)))
                (objectBody
                  (objectEntry
                    (variableExpr
                      (identifier))
                    (methodCallExpr
                      (identifier)
                      (argumentList
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))))))
              (forGenerator
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (typedIdentifier
                  (identifier)
                  (typeAnnotation
                    (type
                      (qualifiedIdentifier
                        (identifier)))))
                (methodCallExpr
                  (identifier)
                  (argumentList
                    (intLiteral)
                    (intLiteral)))
                (objectBody
                  (objectEntry
                    (variableExpr
                      (identifier))
                    (methodCallExpr
                      (identifier)
                      (argumentList
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (slStringLiteral)
              (slStringLiteral)
              (slStringLiteral)))
          (objectBody
            (objectEntry
              (variableExpr
                (identifier))
              (variableExpr
                (identifier)))
            (objectEntry
              (binaryExpr
                (variableExpr
                  (identifier))
                (slStringLiteral))
              (binaryExpr
                (variableExpr
                  (identifier))
                (slStringLiteral)))
            (objectEntry
              (binaryExpr
                (variableExpr
                  (identifier))
                (slStringLiteral))
              (binaryExpr
                (variableExpr
                  (identifier))
                (slStringLiteral))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (methodCallExpr
            (identifier)
            (argumentList
              (slStringLiteral)
              (slStringLiteral)))
          (objectBody
            (forGenerator
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (methodCallExpr
                (identifier)
                (argumentList
                  (slStringLiteral)
                  (intLiteral)
                  (slStringLiteral)
                  (intLiteral)))
              (objectBody
                (objectEntry
                  (methodCallExpr
                    (binaryExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))
                      (variableExpr
                        (identifier)))
                    (identifier)
                    (argumentList))
                  (methodCallExpr
                    (binaryExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))
                      (variableExpr
                        (identifier)))
                    (identifier)
                    (argumentList)))
                (objectEntry
                  (binaryExpr
                    (binaryExpr
                      (methodCallExpr
                        (variableExpr
                          (identifier))
                        (identifier)
                        (argumentList))
                      (variableExpr
                        (identifier)))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (binaryExpr
                      (methodCallExpr
                        (variableExpr
                          (identifier))
                        (identifier)
                        (argumentList))
                      (variableExpr
                        (identifier)))
                    (variableExpr
                      (identifier))))))
            (forGenerator
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (typedIdentifier
                (identifier)
                (typeAnnotation
                  (type
                    (qualifiedIdentifier
                      (identifier)))))
              (methodCallExpr
                (identifier)
                (argumentList
                  (slStringLiteral)
                  (intLiteral)
                  (slStringLiteral)
                  (intLiteral)))
              (objectBody
                (objectEntry
                  (methodCallExpr
                    (binaryExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))
                      (variableExpr
                        (identifier)))
                    (identifier)
                    (argumentList))
                  (methodCallExpr
                    (binaryExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (variableExpr
                          (identifier)))
                      (variableExpr
                        (identifier)))
                    (identifier)
                    (argumentList)))
                (objectEntry
                  (binaryExpr
                    (binaryExpr
                      (methodCallExpr
                        (variableExpr
                          (identifier))
                        (identifier)
                        (argumentList))
                      (variableExpr
                        (identifier)))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (binaryExpr
                      (methodCallExpr
                        (variableExpr
                          (identifier))
                        (identifier)
                        (argumentList))
                      (variableExpr
                        (identifier)))
                    (variableExpr
                      (identifier)))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (intLiteral)))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (intLiteral)))
                    (variableExpr
                      (identifier))))
                (objectEntry
                  (binaryExpr
                    (binaryExpr
                      (parenthesizedExpr
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral)))
                      (variableExpr
                        (identifier)))
                    (intLiteral))
                  (binaryExpr
                    (binaryExpr
                      (parenthesizedExpr
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral)))
                      (variableExpr
                        (identifier)))
                    (intLiteral))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (whenGenerator
                  (binaryExpr
                    (variableExpr
                      (identifier))
                    (intLiteral))
                  (objectBody
                    (objectEntry
                      (binaryExpr
                        (parenthesizedExpr
                          (binaryExpr
                            (variableExpr
                              (identifier))
                            (intLiteral)))
                        (variableExpr
                          (identifier)))
                      (binaryExpr
                        (parenthesizedExpr
                          (binaryExpr
                            (variableExpr
                              (identifier))
                            (intLiteral)))
                        (variableExpr
                          (identifier))))
                    (objectEntry
                      (binaryExpr
                        (binaryExpr
                          (parenthesizedExpr
                            (binaryExpr
                              (variableExpr
                                (identifier))
                              (intLiteral)))
                          (variableExpr
                            (identifier)))
                        (intLiteral))
                      (binaryExpr
                        (binaryExpr
                          (parenthesizedExpr
                            (binaryExpr
                              (variableExpr
                                (identifier))
                              (intLiteral)))
                          (variableExpr
                            (identifier)))
                        (intLiteral))))))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (typedIdentifier
            (identifier)
            (typeAnnotation
              (type
                (qualifiedIdentifier
                  (identifier)))))
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))
              (objectElement
                (intLiteral))))
          (objectBody
            (whenGenerator
              (propertyCallExpr
                (variableExpr
                  (identifier))
                (identifier))
              (objectBody
                (objectEntry
                  (binaryExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (intLiteral)))
                    (variableExpr
                      (identifier)))
                  (binaryExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (intLiteral)))
                    (variableExpr
                      (identifier))))
                (objectEntry
                  (binaryExpr
                    (binaryExpr
                      (parenthesizedExpr
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral)))
                      (variableExpr
                        (identifier)))
                    (intLiteral))
                  (binaryExpr
                    (binaryExpr
                      (parenthesizedExpr
                        (binaryExpr
                          (variableExpr
                            (identifier))
                          (intLiteral)))
                      (variableExpr
                        (identifier)))
                    (intLiteral)))))
            (objectProperty
              (identifier)
              (objectBody
                (objectEntry
                  (methodCallExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (parenthesizedExpr
                          (binaryExpr
                            (variableExpr
                              (identifier))
                            (intLiteral)))
                        (variableExpr
                          (identifier))))
                    (identifier)
                    (argumentList))
                  (methodCallExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (parenthesizedExpr
                          (binaryExpr
                            (variableExpr
                              (identifier))
                            (intLiteral)))
                        (variableExpr
                          (identifier))))
                    (identifier)
                    (argumentList)))
                (objectEntry
                  (methodCallExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (binaryExpr
                          (parenthesizedExpr
                            (binaryExpr
                              (variableExpr
                                (identifier))
                              (intLiteral)))
                          (variableExpr
                            (identifier)))
                        (intLiteral)))
                    (identifier)
                    (argumentList))
                  (methodCallExpr
                    (parenthesizedExpr
                      (binaryExpr
                        (binaryExpr
                          (parenthesizedExpr
                            (binaryExpr
                              (variableExpr
                                (identifier))
                              (intLiteral)))
                          (variableExpr
                            (identifier)))
                        (intLiteral)))
                    (identifier)
                    (argumentList)))))))))))
