From 43d6c17f2979ef39335d9c6f107358c40f4fba83 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 1 Mar 2018 10:16:07 -0800 Subject: [PATCH] [IR] do not take captured vars into account for program vars, only the captured expression Reviewed By: sblackshear Differential Revision: D7114533 fbshipit-source-id: 7057a0e --- infer/src/IR/Exp.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/IR/Exp.ml b/infer/src/IR/Exp.ml index 19421bbd5..d135a38cf 100644 --- a/infer/src/IR/Exp.ml +++ b/infer/src/IR/Exp.ml @@ -325,7 +325,7 @@ let rec gen_program_vars = | BinOp (_, e1, e2) | Lindex (e1, e2) -> gen_program_vars e1 >>= fun () -> gen_program_vars e2 | Closure {captured_vars} -> - ISequence.gen_sequence_list captured_vars ~f:(fun (_, p, _) -> yield p) + ISequence.gen_sequence_list captured_vars ~f:(fun (e, _, _) -> gen_program_vars e) let program_vars e = Sequence.Generator.run (gen_program_vars e)