compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name: "A"
      members {
        function {
          name: "F"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
        }
      }
      self {
        name: "Self"
        type {
          type_type_literal {
          }
        }
      }
    }
  }
  declarations {
    interface {
      name: "B"
      members {
        function {
          name: "F"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
        }
      }
      self {
        name: "Self"
        type {
          type_type_literal {
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        identifier {
          name: "A"
        }
      }
      members {
        function {
          name: "F"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  int_literal {
                    value: 1
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        identifier {
          name: "B"
        }
      }
      members {
        function {
          name: "F"
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  int_literal {
                    value: 2
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name: "GetA"
      deduced_parameters {
        name: "T"
        type {
          identifier {
            name: "A"
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  simple_member_access {
                    field: "F"
                    object {
                      identifier {
                        name: "x"
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name: "GetAB"
      deduced_parameters {
        name: "T"
        type {
          where {
            base {
              identifier {
                name: "B"
              }
            }
            clauses {
              is {
                type {
                  designator {
                    name: "Self"
                  }
                }
                constraint {
                  identifier {
                    name: "A"
                  }
                }
              }
            }
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              operator {
                op: Add
                arguments {
                  operator {
                    op: Mul
                    arguments {
                      int_literal {
                        value: 10
                      }
                    }
                    arguments {
                      call {
                        function {
                          identifier {
                            name: "GetA"
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              identifier {
                                name: "x"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                arguments {
                  call {
                    function {
                      simple_member_access {
                        field: "F"
                        object {
                          identifier {
                            name: "x"
                          }
                        }
                      }
                    }
                    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: "v"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
            init {
              int_literal {
                value: 0
              }
            }
            is_returned: false
          }
        }
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "GetAB"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "v"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
