From 3f2b7df7b4e71084d026af9ee49beb527e6c9874 Mon Sep 17 00:00:00 2001 From: Grigorii Kirgizov Date: Wed, 22 Apr 2020 19:18:14 +0300 Subject: [PATCH] Add sanity check that every match has active occurrence in its head (MPSCR-59) --- .../logic/reactor/core/internal/ConstraintsProcessing.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt index 5a425c1a..25ebba97 100644 --- a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt +++ b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt @@ -249,10 +249,10 @@ internal class ConstraintsProcessing(private var dispatchingFront: Dispatcher.Di // TODO: paranoid check. should be isAlive() instead // FIXME: move this check elsewhere - if (status.operational && active.stored && match.allStored()) + if (status.operational && active.stored && match.allStored()) { + assert(match.allHeads().contains(active)) processMatch(controller, match, parent, status) - else - status + } else status } // TODO: should be isAlive()