Skip to content

Commit 1655e22

Browse files
committed
SIL: fix the == operator for AccessPath
The offset was not compared.
1 parent 028afc0 commit 1655e22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/swift/SIL/MemAccessUtils.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,8 @@ class AccessPath {
943943

944944
bool operator==(AccessPath other) const {
945945
return
946-
storage.hasIdenticalBase(other.storage) && pathNode == other.pathNode;
946+
storage.hasIdenticalBase(other.storage) && pathNode == other.pathNode &&
947+
offset == other.offset;
947948
}
948949
bool operator!=(AccessPath other) const { return !(*this == other); }
949950

0 commit comments

Comments
 (0)