compilation_unit {
  package_statement {
    package_name: "Foo"
  }
  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 {
    class_declaration {
      name: "X"
      members {
        impl {
          kind: InternalImpl
          impl_type {
            identifier {
              name: "Self"
            }
          }
          interface {
            identifier {
              name: "A"
            }
          }
          members {
            function {
              name: "F"
              param_pattern {
              }
              return_term {
                kind: Expression
                type {
                  int_type_literal {
                  }
                }
              }
              body {
                statements {
                  return_statement {
                    expression {
                      int_literal {
                        value: 1
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  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: "X"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_type_literal {
              }
            }
          }
        }
        statements {
          return_statement {
            expression {
              call {
                function {
                  compound_member_access {
                    object {
                      identifier {
                        name: "a"
                      }
                    }
                    path {
                      compound_member_access {
                        object {
                          identifier {
                            name: "X"
                          }
                        }
                        path {
                          simple_member_access {
                            field: "F"
                            object {
                              identifier {
                                name: "A"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                argument {
                  tuple_literal {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
