Make NamedEntityInterface non-movable (#946)

This commit is contained in:
Geoff Romer
2021-11-10 09:33:00 -08:00
committed by GitHub
parent e8d9b7675b
commit a9bb06ca14
10 changed files with 82 additions and 61 deletions
+6 -5
View File
@@ -29,8 +29,9 @@ void Declaration::Print(llvm::raw_ostream& out) const {
case Kind::ChoiceDeclaration: {
const auto& choice = cast<ChoiceDeclaration>(*this);
out << "choice " << choice.name() << " {\n";
for (const auto& alt : choice.alternatives()) {
out << "alt " << alt.name() << " " << alt.signature() << ";\n";
for (Nonnull<const ChoiceDeclaration::Alternative*> alt :
choice.alternatives()) {
out << "alt " << alt->name() << " " << alt->signature() << ";\n";
}
out << "}\n";
break;
@@ -49,12 +50,12 @@ void FunctionDeclaration::PrintDepth(int depth, llvm::raw_ostream& out) const {
if (!deduced_parameters_.empty()) {
out << "[";
unsigned int i = 0;
for (const auto& deduced : deduced_parameters_) {
for (Nonnull<const GenericBinding*> deduced : deduced_parameters_) {
if (i != 0) {
out << ", ";
}
out << deduced.name() << ":! ";
deduced.type().Print(out);
out << deduced->name() << ":! ";
deduced->type().Print(out);
++i;
}
out << "]";