compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    class_declaration {
      name {
        name: "A"
      }
      members {
        variable {
          binding {
            name: "n"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        identifier {
          name: "A"
        }
      }
      interface {
        identifier {
          name: "Inc"
        }
      }
      members {
        function {
          name {
            name: "Op"
          }
          self_pattern {
            addr_pattern {
              binding_pattern {
                name: "self"
                type {
                  expression_pattern {
                    expression {
                      operator {
                        op: Ptr
                        arguments {
                          identifier {
                            name: "Self"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Omitted
          }
          body {
            statements {
              inc_dec {
                operand {
                  simple_member_access {
                    field: "n"
                    object {
                      operator {
                        op: Deref
                        arguments {
                          identifier {
                            name: "self"
                          }
                        }
                      }
                    }
                  }
                }
                is_increment: true
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        identifier {
          name: "A"
        }
      }
      interface {
        identifier {
          name: "Dec"
        }
      }
      members {
        function {
          name {
            name: "Op"
          }
          self_pattern {
            addr_pattern {
              binding_pattern {
                name: "self"
                type {
                  expression_pattern {
                    expression {
                      operator {
                        op: Ptr
                        arguments {
                          identifier {
                            name: "Self"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Omitted
          }
          body {
            statements {
              inc_dec {
                operand {
                  simple_member_access {
                    field: "n"
                    object {
                      operator {
                        op: Deref
                        arguments {
                          identifier {
                            name: "self"
                          }
                        }
                      }
                    }
                  }
                }
                is_increment: false
              }
            }
          }
        }
      }
    }
  }
  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: 5
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          inc_dec {
            operand {
              simple_member_access {
                field: "n"
                object {
                  identifier {
                    name: "a"
                  }
                }
              }
            }
            is_increment: true
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          inc_dec {
            operand {
              simple_member_access {
                field: "n"
                object {
                  identifier {
                    name: "a"
                  }
                }
              }
            }
            is_increment: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          inc_dec {
            operand {
              identifier {
                name: "a"
              }
            }
            is_increment: true
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          inc_dec {
            operand {
              identifier {
                name: "a"
              }
            }
            is_increment: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  compound_member_access {
                    object {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                    path {
                      simple_member_access {
                        field: "Op"
                        object {
                          identifier {
                            name: "Inc"
                          }
                        }
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  compound_member_access {
                    object {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                    path {
                      simple_member_access {
                        field: "Op"
                        object {
                          identifier {
                            name: "Dec"
                          }
                        }
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  compound_member_access {
                    object {
                      identifier {
                        name: "a"
                      }
                    }
                    path {
                      simple_member_access {
                        field: "Op"
                        object {
                          identifier {
                            name: "Inc"
                          }
                        }
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  compound_member_access {
                    object {
                      identifier {
                        name: "a"
                      }
                    }
                    path {
                      simple_member_access {
                        field: "Op"
                        object {
                          identifier {
                            name: "Dec"
                          }
                        }
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "a"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
