Skip to content

Commit

Permalink
Fix equality of TypeWitnessAndDecl
Browse files Browse the repository at this point in the history
It was incorrectly hashing the type as a pointer
but canonicalizing for equality. Change equality
to compare pointers.
  • Loading branch information
hamishknight committed Jun 16, 2020
1 parent ff61b24 commit 6041d2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/swift/AST/Witness.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct TypeWitnessAndDecl {

friend bool operator==(const TypeWitnessAndDecl &lhs,
const TypeWitnessAndDecl &rhs) {
return lhs.witnessType->isEqual(rhs.witnessType) &&
return lhs.witnessType.getPointer() == rhs.witnessType.getPointer() &&
lhs.witnessDecl == rhs.witnessDecl;
}

Expand Down

0 comments on commit 6041d2a

Please sign in to comment.