compilation_unit {
  package_statement {
    package_name: "Foo"
  }
  is_api: true
  declarations {
    class_declaration {
      name {
        name: "X"
      }
      members {
        function {
          name {
            name: "F"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  simple_member_access {
                    field: "n"
                    object {
                      identifier {
                        name: "self"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      members {
        variable {
          binding {
            name: "n"
            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: "v"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "X"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "n"
                  expression {
                    int_literal {
                      value: 1
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "p"
                type {
                  expression_pattern {
                    expression {
                      operator {
                        op: Ptr
                        arguments {
                          identifier {
                            name: "X"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              operator {
                op: AddressOf
                arguments {
                  identifier {
                    name: "v"
                  }
                }
              }
            }
            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: "n"
                        object {
                          operator {
                            op: Deref
                            arguments {
                              identifier {
                                name: "p"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      compound_member_access {
                        object {
                          operator {
                            op: Deref
                            arguments {
                              identifier {
                                name: "p"
                              }
                            }
                          }
                        }
                        path {
                          simple_member_access {
                            field: "n"
                            object {
                              identifier {
                                name: "X"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      call {
                        function {
                          simple_member_access {
                            field: "F"
                            object {
                              operator {
                                op: Deref
                                arguments {
                                  identifier {
                                    name: "p"
                                  }
                                }
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "{0}"
                      }
                    }
                    fields {
                      call {
                        function {
                          compound_member_access {
                            object {
                              operator {
                                op: Deref
                                arguments {
                                  identifier {
                                    name: "p"
                                  }
                                }
                              }
                            }
                            path {
                              simple_member_access {
                                field: "F"
                                object {
                                  identifier {
                                    name: "X"
                                  }
                                }
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
