compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    class_declaration {
      name {
        name: "A"
      }
      members {
        variable {
          binding {
            name: "a"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "B"
      }
      members {
        variable {
          binding {
            name: "b"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        identifier {
          name: "A"
        }
      }
      interface {
        call {
          function {
            identifier {
              name: "As"
            }
          }
          argument {
            tuple_literal {
              fields {
                identifier {
                  name: "B"
                }
              }
            }
          }
        }
      }
      members {
        function {
          name {
            name: "Convert"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "B"
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  struct_literal {
                    fields {
                      name: "b"
                      expression {
                        simple_member_access {
                          field: "a"
                          object {
                            identifier {
                              name: "self"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  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 {
                      tuple_literal {
                        fields {
                          int_type_literal {
                          }
                        }
                        fields {
                          identifier {
                            name: "A"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              tuple_literal {
                fields {
                  int_literal {
                    value: 1
                  }
                }
                fields {
                  struct_literal {
                    fields {
                      name: "a"
                      expression {
                        int_literal {
                          value: 2
                        }
                      }
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "b"
                type {
                  expression_pattern {
                    expression {
                      tuple_literal {
                        fields {
                          int_type_literal {
                          }
                        }
                        fields {
                          identifier {
                            name: "B"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              identifier {
                name: "a"
              }
            }
            is_returned: false
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
