================================================================================
classes/constraints4
================================================================================

import "pkl:test"

class Gauge {
  min: Int
  max: Int(this >= min)
}

res1 = new Gauge {
  min = 4
  max = 6
}

res2 = test.catch(() ->
  new Gauge {
    min = 4
    max = 3
  }.max
)

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

(module
  (importClause
    (stringConstant))
  (clazz
    (identifier)
    (classBody
      (classProperty
        (identifier)
        (typeAnnotation
          (type
            (qualifiedIdentifier
              (identifier)))))
      (classProperty
        (identifier)
        (typeAnnotation
          (type
            (type
              (qualifiedIdentifier
                (identifier)))
            (binaryExpr
              (thisExpr)
              (variableExpr
                (identifier))))))))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (objectProperty
          (identifier)
          (intLiteral))
        (objectProperty
          (identifier)
          (intLiteral)))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (functionLiteral
          (parameterList)
          (propertyCallExpr
            (newExpr
              (type
                (qualifiedIdentifier
                  (identifier)))
              (objectBody
                (objectProperty
                  (identifier)
                  (intLiteral))
                (objectProperty
                  (identifier)
                  (intLiteral))))
            (identifier)))))))
