compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "Iface"
      }
      members {
        let {
          pattern {
            generic_binding {
              name: "T"
              type {
                type_type_literal {
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "F"
      }
      param_pattern {
        fields {
          generic_binding {
            name: "T"
            type {
              where {
                base {
                  identifier {
                    name: "Iface"
                  }
                }
                clauses {
                  equals {
                    lhs {
                      designator {
                        name: "T"
                      }
                    }
                    rhs {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Omitted
      }
      body {
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "Good"
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "Bad"
      }
    }
  }
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        identifier {
          name: "Good"
        }
      }
      interface {
        where {
          base {
            identifier {
              name: "Iface"
            }
          }
          clauses {
            rewrite {
              member_name: "T"
              replacement {
                int_type_literal {
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        identifier {
          name: "Bad"
        }
      }
      interface {
        where {
          base {
            identifier {
              name: "Iface"
            }
          }
          clauses {
            rewrite {
              member_name: "T"
              replacement {
                identifier {
                  name: "Bad"
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "F"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "Good"
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "F"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "Bad"
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
