Files
carbon-lang/explorer/ast/impl_binding.cpp
T
Richard Smith 782bd87316 AST cloning mechanism (#2699)
This is intended to be used for template instantiation, but for now takes no stance as to what it's cloning.

This is tested by parsing and cloning all of our test files, and checking that the result of converting each AST to proto is the same as the result of cloning and then converting each AST to proto.
2023-03-21 12:36:05 -07:00

19 lines
627 B
C++

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "explorer/ast/impl_binding.h"
#include "explorer/ast/pattern.h"
namespace Carbon {
ImplBinding::ImplBinding(CloneContext& context, const ImplBinding& other)
: AstNode(context, other),
type_var_(context.Remap(other.type_var_)),
iface_(context.Clone(other.iface_)),
symbolic_identity_(context.Clone(other.symbolic_identity_)),
original_(context.Remap(other.original_)) {}
} // namespace Carbon