From e5e96053ea6e3a34c30ff6dce495ad463650d293 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 10 Oct 2024 00:42:00 -0700 Subject: [PATCH] Bug fix in reorderStmts Summary: Tracking of bound variables was wrong. This hopefully shouldn't change any existing test cases or perf, but it was exposed by other changes I'm making in subsequent diffs. Reviewed By: malanka Differential Revision: D64036030 fbshipit-source-id: a39974e77922cbded5924d77e42a6963784cd2e4 --- glean/db/Glean/Query/Reorder.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glean/db/Glean/Query/Reorder.hs b/glean/db/Glean/Query/Reorder.hs index 433a53614..1f1941145 100644 --- a/glean/db/Glean/Query/Reorder.hs +++ b/glean/db/Glean/Query/Reorder.hs @@ -191,7 +191,7 @@ reorderGroup g = do (stmts'',bound'') <- go bound' rest return (FlatDisjunction [g'] : stmts'', bound'') go bound (stmt : rest) = do - (stmts', bound') <- go (IntSet.union (vars stmt) bound) rest + (stmts', bound') <- go (IntSet.union (boundVars stmt) bound) rest return (stmt : stmts', bound') squash [] = []