Skip to content

Commit

Permalink
Avoid duplicate type bag
Browse files Browse the repository at this point in the history
  • Loading branch information
DavyLandman committed Jan 10, 2024
1 parent e3e1a47 commit 337de0a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ public ISet closure() {
// this means no other types can be introduced other than the originals,
// so iteration is no longer necessary to construct the new type bag
keyTypeBag = AbstractTypeBag.of(keyType, result.size());
valTypeBag = AbstractTypeBag.of(valueType, result.size());
valTypeBag = keyTypeBag;
}
else {
keyTypeBag = calcTypeBag(result, Map.Entry::getKey);
Expand Down Expand Up @@ -611,7 +611,7 @@ public ISet closureStar() {
// this means no other types can be introduced other than the originals,
// so iteration is no longer necessary to construct the new type bag
keyTypeBag = AbstractTypeBag.of(keyType, result.size());
valTypeBag = AbstractTypeBag.of(valueType, result.size());
valTypeBag = keyTypeBag;
}
else {
keyTypeBag = calcTypeBag(result, Map.Entry::getKey);
Expand Down

0 comments on commit 337de0a

Please sign in to comment.