From e9e3440f740156818e29ecc7d01b284a534e1594 Mon Sep 17 00:00:00 2001 From: Jonathan Protzenko Date: Mon, 21 Oct 2024 17:07:33 -0700 Subject: [PATCH] Fixes #493 --- lib/UseAnalysis.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/UseAnalysis.ml b/lib/UseAnalysis.ml index 1689cb06..cf75e97a 100644 --- a/lib/UseAnalysis.ml +++ b/lib/UseAnalysis.ml @@ -207,7 +207,7 @@ let use_mark_to_remove_or_ignore final = object (self) (* Definitely unused, except we can't generate let _ = ignore (bufcreate ...) -- this is a bad idea, as it'll force the hoisting phase to hoist the bufcreate back into a let-binding, which will then be named "buf". *) - else if not (is_bufcreate e1) then + else if not (is_bufcreate e1) && Helpers.is_value e1 then ELet ({ node = { b.node with meta = Some MetaSequence }; typ = TUnit; meta = []}, push_ignore e1, e2)