Skip to content

Commit d5174b2

Browse files
committed
AST: make RequirementMachine/PropertyUnification.cpp build on VS2022
Using the qualified name is subtly different from scoping the function. Use the latter, which correctly places the function into the namespace, to enable building with VS2022.
1 parent 3ec0413 commit d5174b2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/AST/RequirementMachine/PropertyUnification.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -650,11 +650,13 @@ RewriteSystem::TypeWitness::TypeWitness(
650650
getConcreteConformance().getProtocol());
651651
}
652652

653-
bool swift::rewriting::operator==(
654-
const RewriteSystem::TypeWitness &lhs,
655-
const RewriteSystem::TypeWitness &rhs) {
656-
return (lhs.LHS == rhs.LHS &&
657-
lhs.RHS == rhs.RHS);
653+
namespace swift {
654+
namespace rewriting {
655+
bool operator==(const RewriteSystem::TypeWitness &lhs,
656+
const RewriteSystem::TypeWitness &rhs) {
657+
return lhs.LHS == rhs.LHS && lhs.RHS == rhs.RHS;
658+
}
659+
}
658660
}
659661

660662
void RewriteSystem::TypeWitness::dump(llvm::raw_ostream &out) const {
@@ -906,4 +908,4 @@ void PropertyMap::recordConcreteConformanceRule(
906908
path.invert();
907909

908910
inducedRules.emplace_back(std::move(lhs), std::move(rhs), std::move(path));
909-
}
911+
}

0 commit comments

Comments
 (0)