compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    class_declaration {
      name {
        name: "MyType"
      }
      members {
        variable {
          binding {
            name: "value"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      members {
        impl {
          kind: InternalImpl
          impl_type {
            identifier {
              name: "Self"
            }
          }
          interface {
            call {
              function {
                identifier {
                  name: "EqWith"
                }
              }
              argument {
                tuple_literal {
                  fields {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          members {
            function {
              name {
                name: "Equal"
              }
              self_pattern {
                binding_pattern {
                  name: "self"
                  type {
                    expression_pattern {
                      expression {
                        identifier {
                          name: "Self"
                        }
                      }
                    }
                  }
                }
              }
              param_pattern {
                fields {
                  binding_pattern {
                    name: "other"
                    type {
                      expression_pattern {
                        expression {
                          identifier {
                            name: "Self"
                          }
                        }
                      }
                    }
                  }
                }
              }
              return_term {
                kind: Expression
                type {
                  bool_type_literal {
                  }
                }
              }
              body {
                statements {
                  return_expression_statement {
                    expression {
                      operator {
                        op: Eq
                        arguments {
                          simple_member_access {
                            field: "value"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        arguments {
                          simple_member_access {
                            field: "value"
                            object {
                              identifier {
                                name: "other"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
          members {
            function {
              name {
                name: "NotEqual"
              }
              self_pattern {
                binding_pattern {
                  name: "self"
                  type {
                    expression_pattern {
                      expression {
                        identifier {
                          name: "Self"
                        }
                      }
                    }
                  }
                }
              }
              param_pattern {
                fields {
                  binding_pattern {
                    name: "other"
                    type {
                      expression_pattern {
                        expression {
                          identifier {
                            name: "Self"
                          }
                        }
                      }
                    }
                  }
                }
              }
              return_term {
                kind: Expression
                type {
                  bool_type_literal {
                  }
                }
              }
              body {
                statements {
                  return_expression_statement {
                    expression {
                      operator {
                        op: NotEq
                        arguments {
                          simple_member_access {
                            field: "value"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        arguments {
                          simple_member_access {
                            field: "value"
                            object {
                              identifier {
                                name: "other"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "x"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "MyType"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "value"
                  expression {
                    int_literal {
                      value: 1
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "y"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "MyType"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "value"
                  expression {
                    int_literal {
                      value: 2
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "structs equal: {0}"
                      }
                    }
                    fields {
                      if_expression {
                        condition {
                          operator {
                            op: Eq
                            arguments {
                              identifier {
                                name: "x"
                              }
                            }
                            arguments {
                              identifier {
                                name: "y"
                              }
                            }
                          }
                        }
                        then_expression {
                          int_literal {
                            value: 1
                          }
                        }
                        else_expression {
                          int_literal {
                            value: 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "structs not equal: {0}"
                      }
                    }
                    fields {
                      if_expression {
                        condition {
                          operator {
                            op: NotEq
                            arguments {
                              identifier {
                                name: "x"
                              }
                            }
                            arguments {
                              identifier {
                                name: "y"
                              }
                            }
                          }
                        }
                        then_expression {
                          int_literal {
                            value: 1
                          }
                        }
                        else_expression {
                          int_literal {
                            value: 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
