Skip to content

Commit e5d772d

Browse files
committed
Fix bug missing return in operator=
1 parent 54f9cae commit e5d772d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/swift/Basic/SuccessorMap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,15 @@ class SuccessorMap {
7878
clear();
7979
Root = other.Root;
8080
other.Root = nullptr;
81+
return *this;
8182
}
8283

8384
SuccessorMap(const SuccessorMap &other) : Root(copyTree(other.Root)) {}
8485
SuccessorMap &operator=(const SuccessorMap &other) {
8586
// TODO: this is clearly optimizable to re-use nodes.
8687
deleteTree(Root);
8788
Root = copyTree(other.Root);
89+
return *this;
8890
}
8991

9092
~SuccessorMap() {

0 commit comments

Comments
 (0)