compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name: "Addable"
      members {
        function {
          name: "Add"
          me_pattern {
            binding_pattern {
              name: "me"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "k"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "Self"
              }
            }
          }
        }
      }
      self {
        name: "Self"
        type {
          type_type_literal {
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        identifier {
          name: "Addable"
        }
      }
      members {
        function {
          name: "Add"
          me_pattern {
            binding_pattern {
              name: "me"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "k"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "Self"
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: Add
                    arguments {
                      identifier {
                        name: "me"
                      }
                    }
                    arguments {
                      identifier {
                        name: "k"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name: "Class"
      members {
        variable {
          binding {
            name: "n"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name: "GenericClass"
      members {
        variable {
          binding {
            name: "m"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      members {
        function {
          name: "Get"
          me_pattern {
            binding_pattern {
              name: "me"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "n"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "T"
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  call {
                    function {
                      simple_member_access {
                        field: "Add"
                        object {
                          simple_member_access {
                            field: "m"
                            object {
                              identifier {
                                name: "me"
                              }
                            }
                          }
                        }
                      }
                    }
                    argument {
                      tuple_literal {
                        fields {
                          identifier {
                            name: "n"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      type_params {
        fields {
          generic_binding {
            name: "T"
            type {
              identifier {
                name: "Addable"
              }
            }
          }
        }
      }
    }
  }
  declarations {
    alias {
      name: "ClassAlias"
      target {
        identifier {
          name: "Class"
        }
      }
    }
  }
  declarations {
    alias {
      name: "GenericClassAlias"
      target {
        identifier {
          name: "GenericClass"
        }
      }
    }
  }
  declarations {
    alias {
      name: "ClassSpecializationAlias"
      target {
        call {
          function {
            identifier {
              name: "GenericClassAlias"
            }
          }
          argument {
            tuple_literal {
              fields {
                int_type_literal {
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      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: "Class"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "n"
                  expression {
                    int_literal {
                      value: 1
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "b"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "ClassAlias"
                      }
                    }
                  }
                }
              }
            }
            init {
              identifier {
                name: "a"
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "c"
                type {
                  expression_pattern {
                    expression {
                      call {
                        function {
                          identifier {
                            name: "GenericClass"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              int_type_literal {
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "m"
                  expression {
                    int_literal {
                      value: 2
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "d"
                type {
                  expression_pattern {
                    expression {
                      call {
                        function {
                          identifier {
                            name: "GenericClassAlias"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              int_type_literal {
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              identifier {
                name: "c"
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "e"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "ClassSpecializationAlias"
                      }
                    }
                  }
                }
              }
            }
            init {
              identifier {
                name: "c"
              }
            }
            is_returned: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "b.n: {0}"
                      }
                    }
                    fields {
                      simple_member_access {
                        field: "n"
                        object {
                          identifier {
                            name: "b"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "d.Get(0): {0}"
                      }
                    }
                    fields {
                      call {
                        function {
                          simple_member_access {
                            field: "Get"
                            object {
                              identifier {
                                name: "d"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              int_literal {
                                value: 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "e.Get(1): {0}"
                      }
                    }
                    fields {
                      call {
                        function {
                          simple_member_access {
                            field: "Get"
                            object {
                              identifier {
                                name: "e"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              int_literal {
                                value: 1
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
