compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    class_declaration {
      name: "Class"
      members {
        variable {
          binding {
            name: "a"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name: "GenericClass"
      members {
        variable {
          binding {
            name: "a"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      type_params {
        fields {
          generic_binding {
            name: "T"
            type {
              type_type_literal {
              }
            }
          }
        }
      }
    }
  }
  declarations {
    interface {
      name: "Interface"
      members {
        function {
          name: "Make"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "Self"
              }
            }
          }
        }
      }
      self {
        name: "Self"
        type {
          type_type_literal {
          }
        }
      }
    }
  }
  declarations {
    interface {
      name: "GenericInterface"
      members {
        function {
          name: "Make"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              tuple_literal {
                fields {
                  identifier {
                    name: "Self"
                  }
                }
                fields {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      self {
        name: "Self"
        type {
          type_type_literal {
          }
        }
      }
    }
  }
  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 {
    alias {
      name: "InterfaceAlias"
      target {
        identifier {
          name: "Interface"
        }
      }
    }
  }
  declarations {
    alias {
      name: "GenericInterfaceAlias"
      target {
        identifier {
          name: "GenericInterface"
        }
      }
    }
  }
  declarations {
    alias {
      name: "InterfaceSpecializationAlias"
      target {
        call {
          function {
            identifier {
              name: "GenericInterfaceAlias"
            }
          }
          argument {
            tuple_literal {
              fields {
                int_type_literal {
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        identifier {
          name: "ClassAlias"
        }
      }
      interface {
        identifier {
          name: "InterfaceAlias"
        }
      }
      members {
        function {
          name: "Make"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "Self"
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  struct_literal {
                    fields {
                      name: "a"
                      expression {
                        int_literal {
                          value: 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        identifier {
          name: "ClassSpecializationAlias"
        }
      }
      interface {
        identifier {
          name: "InterfaceSpecializationAlias"
        }
      }
      members {
        function {
          name: "Make"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              tuple_literal {
                fields {
                  identifier {
                    name: "Self"
                  }
                }
                fields {
                  int_type_literal {
                  }
                }
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  tuple_literal {
                    fields {
                      struct_literal {
                        fields {
                          name: "a"
                          expression {
                            int_literal {
                              value: 2
                            }
                          }
                        }
                      }
                    }
                    fields {
                      int_literal {
                        value: 3
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    alias {
      name: "S"
      target {
        struct_type_literal {
          fields {
            name: "a"
            expression {
              int_type_literal {
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        call {
          function {
            identifier {
              name: "GenericClassAlias"
            }
          }
          argument {
            tuple_literal {
              fields {
                identifier {
                  name: "S"
                }
              }
            }
          }
        }
      }
      interface {
        call {
          function {
            identifier {
              name: "GenericInterfaceAlias"
            }
          }
          argument {
            tuple_literal {
              fields {
                identifier {
                  name: "S"
                }
              }
            }
          }
        }
      }
      members {
        function {
          name: "Make"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              tuple_literal {
                fields {
                  identifier {
                    name: "Self"
                  }
                }
                fields {
                  struct_type_literal {
                    fields {
                      name: "a"
                      expression {
                        int_type_literal {
                        }
                      }
                    }
                  }
                }
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  tuple_literal {
                    fields {
                      struct_literal {
                        fields {
                          name: "a"
                          expression {
                            struct_literal {
                              fields {
                                name: "a"
                                expression {
                                  int_literal {
                                    value: 4
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                    fields {
                      struct_literal {
                        fields {
                          name: "a"
                          expression {
                            int_literal {
                              value: 5
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name: "CheckImplementsInterface"
      deduced_parameters {
        name: "T"
        type {
          identifier {
            name: "Interface"
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          identifier {
            name: "T"
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  simple_member_access {
                    field: "Make"
                    object {
                      identifier {
                        name: "T"
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name: "CheckImplementsGenericInterface_i32"
      deduced_parameters {
        name: "T"
        type {
          call {
            function {
              identifier {
                name: "GenericInterface"
              }
            }
            argument {
              tuple_literal {
                fields {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          tuple_literal {
            fields {
              identifier {
                name: "T"
              }
            }
            fields {
              int_type_literal {
              }
            }
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  simple_member_access {
                    field: "Make"
                    object {
                      identifier {
                        name: "T"
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name: "CheckImplementsGenericInterface_struct"
      deduced_parameters {
        name: "T"
        type {
          call {
            function {
              identifier {
                name: "GenericInterface"
              }
            }
            argument {
              tuple_literal {
                fields {
                  identifier {
                    name: "S"
                  }
                }
              }
            }
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          tuple_literal {
            fields {
              identifier {
                name: "T"
              }
            }
            fields {
              identifier {
                name: "S"
              }
            }
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  simple_member_access {
                    field: "Make"
                    object {
                      identifier {
                        name: "T"
                      }
                    }
                  }
                }
                argument {
                  tuple_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: "a"
                  expression {
                    int_literal {
                      value: 0
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          assign {
            lhs {
              identifier {
                name: "a"
              }
            }
            rhs {
              call {
                function {
                  identifier {
                    name: "CheckImplementsInterface"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "a"
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "b"
                type {
                  expression_pattern {
                    expression {
                      call {
                        function {
                          identifier {
                            name: "GenericClass"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              int_type_literal {
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "a"
                  expression {
                    int_literal {
                      value: 0
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              tuple_pattern {
                fields {
                  binding_pattern {
                    name: "b2"
                    type {
                      expression_pattern {
                        expression {
                          call {
                            function {
                              identifier {
                                name: "GenericClass"
                              }
                            }
                            argument {
                              tuple_literal {
                                fields {
                                  int_type_literal {
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                fields {
                  binding_pattern {
                    name: "n"
                    type {
                      expression_pattern {
                        expression {
                          int_type_literal {
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              call {
                function {
                  identifier {
                    name: "CheckImplementsGenericInterface_i32"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "b"
                      }
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "c"
                type {
                  expression_pattern {
                    expression {
                      call {
                        function {
                          identifier {
                            name: "GenericClass"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              struct_type_literal {
                                fields {
                                  name: "a"
                                  expression {
                                    int_type_literal {
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "a"
                  expression {
                    struct_literal {
                      fields {
                        name: "a"
                        expression {
                          int_literal {
                            value: 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              tuple_pattern {
                fields {
                  binding_pattern {
                    name: "c2"
                    type {
                      expression_pattern {
                        expression {
                          call {
                            function {
                              identifier {
                                name: "GenericClass"
                              }
                            }
                            argument {
                              tuple_literal {
                                fields {
                                  struct_type_literal {
                                    fields {
                                      name: "a"
                                      expression {
                                        int_type_literal {
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                fields {
                  binding_pattern {
                    name: "s"
                    type {
                      expression_pattern {
                        expression {
                          identifier {
                            name: "S"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              call {
                function {
                  identifier {
                    name: "CheckImplementsGenericInterface_struct"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "c"
                      }
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          return_expression_statement {
            expression {
              operator {
                op: Add
                arguments {
                  operator {
                    op: Add
                    arguments {
                      operator {
                        op: Add
                        arguments {
                          operator {
                            op: Add
                            arguments {
                              operator {
                                op: Mul
                                arguments {
                                  int_literal {
                                    value: 10000
                                  }
                                }
                                arguments {
                                  simple_member_access {
                                    field: "a"
                                    object {
                                      identifier {
                                        name: "a"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                            arguments {
                              operator {
                                op: Mul
                                arguments {
                                  int_literal {
                                    value: 1000
                                  }
                                }
                                arguments {
                                  simple_member_access {
                                    field: "a"
                                    object {
                                      identifier {
                                        name: "b2"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                        arguments {
                          operator {
                            op: Mul
                            arguments {
                              int_literal {
                                value: 100
                              }
                            }
                            arguments {
                              identifier {
                                name: "n"
                              }
                            }
                          }
                        }
                      }
                    }
                    arguments {
                      operator {
                        op: Mul
                        arguments {
                          int_literal {
                            value: 10
                          }
                        }
                        arguments {
                          simple_member_access {
                            field: "a"
                            object {
                              simple_member_access {
                                field: "a"
                                object {
                                  identifier {
                                    name: "c2"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                arguments {
                  simple_member_access {
                    field: "a"
                    object {
                      identifier {
                        name: "s"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
