compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "Number"
      }
      members {
        function {
          name {
            name: "Zero"
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "Self"
              }
            }
          }
        }
      }
      members {
        function {
          name {
            name: "Add"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "other"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "Self"
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "Self"
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        identifier {
          name: "Number"
        }
      }
      members {
        function {
          name {
            name: "Zero"
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  int_literal {
                    value: 0
                  }
                }
              }
            }
          }
        }
      }
      members {
        function {
          name {
            name: "Add"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    int_type_literal {
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "other"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: Add
                    arguments {
                      identifier {
                        name: "self"
                      }
                    }
                    arguments {
                      identifier {
                        name: "other"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "A"
      }
      members {
        variable {
          binding {
            name: "value_a"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      type_params {
        fields {
          generic_binding {
            name: "T"
            type {
              identifier {
                name: "Number"
              }
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "B"
      }
      members {
        variable {
          binding {
            name: "value_b"
            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: "b"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "B"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "base"
                  expression {
                    struct_literal {
                      fields {
                        name: "value_a"
                        expression {
                          int_literal {
                            value: 1
                          }
                        }
                      }
                    }
                  }
                }
                fields {
                  name: "value_b"
                  expression {
                    int_literal {
                      value: 2
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "value_b"
                        object {
                          identifier {
                            name: "b"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "value_a"
                        object {
                          identifier {
                            name: "b"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
