compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    class_declaration {
      name {
        name: "A"
      }
      members {
        destructor {
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          body {
            statements {
              expression_statement {
                expression {
                  call {
                    function {
                      identifier {
                        name: "Print"
                      }
                    }
                    argument {
                      tuple_literal {
                        fields {
                          string_literal {
                            value: "DESTRUCTOR A {0}"
                          }
                        }
                        fields {
                          simple_member_access {
                            field: "n"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      members {
        variable {
          binding {
            name: "n"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "ident"
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  bool_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          bool_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              identifier {
                name: "x"
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "ident_i32"
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              identifier {
                name: "x"
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "i"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
            init {
              int_literal {
                value: 0
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "d"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "A"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "n"
                  expression {
                    int_literal {
                      value: 4
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          if_statement {
            condition {
              call {
                function {
                  identifier {
                    name: "ident"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      bool_literal {
                        value: true
                      }
                    }
                  }
                }
              }
            }
            then_block {
              statements {
                variable_definition {
                  pattern {
                    binding_pattern {
                      name: "a"
                      type {
                        expression_pattern {
                          expression {
                            identifier {
                              name: "A"
                            }
                          }
                        }
                      }
                    }
                  }
                  init {
                    struct_literal {
                      fields {
                        name: "n"
                        expression {
                          int_literal {
                            value: 3
                          }
                        }
                      }
                    }
                  }
                  is_returned: false
                }
              }
              statements {
                if_statement {
                  condition {
                    bool_literal {
                      value: true
                    }
                  }
                  then_block {
                    statements {
                      variable_definition {
                        pattern {
                          binding_pattern {
                            name: "b"
                            type {
                              expression_pattern {
                                expression {
                                  identifier {
                                    name: "A"
                                  }
                                }
                              }
                            }
                          }
                        }
                        init {
                          struct_literal {
                            fields {
                              name: "n"
                              expression {
                                int_literal {
                                  value: 2
                                }
                              }
                            }
                          }
                        }
                        is_returned: false
                      }
                    }
                    statements {
                      expression_statement {
                        expression {
                          call {
                            function {
                              identifier {
                                name: "ident_i32"
                              }
                            }
                            argument {
                              tuple_literal {
                                fields {
                                  int_literal {
                                    value: 2
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                    statements {
                      if_statement {
                        condition {
                          operator {
                            op: Eq
                            arguments {
                              call {
                                function {
                                  identifier {
                                    name: "ident_i32"
                                  }
                                }
                                argument {
                                  tuple_literal {
                                    fields {
                                      int_literal {
                                        value: 0
                                      }
                                    }
                                  }
                                }
                              }
                            }
                            arguments {
                              int_literal {
                                value: 0
                              }
                            }
                          }
                        }
                        then_block {
                          statements {
                            variable_definition {
                              pattern {
                                binding_pattern {
                                  name: "c"
                                  type {
                                    expression_pattern {
                                      expression {
                                        identifier {
                                          name: "A"
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                              init {
                                struct_literal {
                                  fields {
                                    name: "n"
                                    expression {
                                      int_literal {
                                        value: 1
                                      }
                                    }
                                  }
                                }
                              }
                              is_returned: false
                            }
                          }
                          statements {
                            return_expression_statement {
                              expression {
                                int_literal {
                                  value: 2
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 1
              }
            }
          }
        }
      }
    }
  }
}
