Skip to content

Commit 6041d2a

Browse files
committed
Fix equality of TypeWitnessAndDecl
It was incorrectly hashing the type as a pointer but canonicalizing for equality. Change equality to compare pointers.
1 parent ff61b24 commit 6041d2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/AST/Witness.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ struct TypeWitnessAndDecl {
212212

213213
friend bool operator==(const TypeWitnessAndDecl &lhs,
214214
const TypeWitnessAndDecl &rhs) {
215-
return lhs.witnessType->isEqual(rhs.witnessType) &&
215+
return lhs.witnessType.getPointer() == rhs.witnessType.getPointer() &&
216216
lhs.witnessDecl == rhs.witnessDecl;
217217
}
218218

0 commit comments

Comments
 (0)