Skip to content

Commit

Permalink
Skip composite replacements from cyclic replacement check
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Dec 5, 2024
1 parent 4879d80 commit 8c39c67
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ public void addReplacement(Replacement replacement) {
//eliminate cyclic replacements
Replacement toRemove = null;
for(Replacement r : replacements) {
if(r.getBefore().equals(replacement.getAfter()) && r.getAfter().equals(replacement.getBefore())) {
if(r.getBefore().equals(replacement.getAfter()) && r.getAfter().equals(replacement.getBefore()) &&
!r.getType().equals(ReplacementType.COMPOSITE) && !replacement.getType().equals(ReplacementType.COMPOSITE)) {
toRemove = r;
break;
}
Expand Down

0 comments on commit 8c39c67

Please sign in to comment.