compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    class_declaration {
      name: "Wrap"
      members {
        variable {
          binding {
            name: "v"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      type_params {
        fields {
          generic_binding {
            name: "T"
            type {
              type_type_literal {
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name: "MakeWrap"
      deduced_parameters {
        name: "T"
        type {
          type_type_literal {
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          call {
            function {
              identifier {
                name: "Wrap"
              }
            }
            argument {
              tuple_literal {
                fields {
                  identifier {
                    name: "T"
                  }
                }
              }
            }
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              struct_literal {
                fields {
                  name: "v"
                  expression {
                    identifier {
                      name: "x"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        call {
          function {
            identifier {
              name: "Wrap"
            }
          }
          argument {
            tuple_literal {
              fields {
                identifier {
                  name: "T"
                }
              }
            }
          }
        }
      }
      interface {
        call {
          function {
            identifier {
              name: "ImplicitAs"
            }
          }
          argument {
            tuple_literal {
              fields {
                identifier {
                  name: "T"
                }
              }
            }
          }
        }
      }
      members {
        function {
          name: "Convert"
          me_pattern {
            binding_pattern {
              name: "me"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              identifier {
                name: "T"
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  simple_member_access {
                    field: "v"
                    object {
                      identifier {
                        name: "me"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name: "Main"
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "n"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
            init {
              int_literal {
                value: 1
              }
            }
            is_returned: false
          }
        }
        statements {
          continuation {
            name: "k"
            body {
              statements {
                assign {
                  lhs {
                    identifier {
                      name: "n"
                    }
                  }
                  rhs {
                    operator {
                      op: Add
                      arguments {
                        identifier {
                          name: "n"
                        }
                      }
                      arguments {
                        int_literal {
                          value: 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          assign {
            lhs {
              identifier {
                name: "n"
              }
            }
            rhs {
              int_literal {
                value: 2
              }
            }
          }
        }
        statements {
          run {
            argument {
              call {
                function {
                  identifier {
                    name: "MakeWrap"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      identifier {
                        name: "k"
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              identifier {
                name: "n"
              }
            }
          }
        }
      }
    }
  }
}
