Skip to content

Commit

Permalink
fix: debug check should not check whether watcher exists for deleted …
Browse files Browse the repository at this point in the history
…nogoods
  • Loading branch information
ImkoMarijnissen committed Nov 25, 2024
1 parent 909dba9 commit 57c5e7f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pumpkin-solver/src/propagators/nogoods/nogood_propagator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,15 @@ impl NogoodPropagator {
id: nogood.0 as u32,
};

if nogood.1.is_deleted {
// If the clause is deleted then it will have no watchers
assert!(
!is_watching(nogood.1.predicates[0], nogood_id)
&& !is_watching(nogood.1.predicates[1], nogood_id)
);
continue;
}

if !(is_watching(nogood.1.predicates[0], nogood_id)
&& is_watching(nogood.1.predicates[1], nogood_id))
{
Expand Down

0 comments on commit 57c5e7f

Please sign in to comment.