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 A1 {0}"
                          }
                        }
                        fields {
                          simple_member_access {
                            field: "n"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      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 A2 {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: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        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 {
          return_expression_statement {
            expression {
              int_literal {
                value: 1
              }
            }
          }
        }
      }
    }
  }
}
