From f60b00e9e3d379c49495731dc27bf2c890c27186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwena=C3=ABl=20Delaval?= Date: Fri, 8 Feb 2013 14:42:26 +0100 Subject: [PATCH] Bug correction in Inline_extvalues Added handling of controllable variables in Inline_extvalues --- compiler/minils/transformations/inline_extvalues.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/minils/transformations/inline_extvalues.ml b/compiler/minils/transformations/inline_extvalues.ml index 530acdd..5f14907 100644 --- a/compiler/minils/transformations/inline_extvalues.ml +++ b/compiler/minils/transformations/inline_extvalues.ml @@ -57,7 +57,10 @@ let gather_extvalues_node nd = let ty_env = let add env vd = Env.add vd.v_ident vd.v_linearity env in let add_l env vd_list = List.fold_left add env vd_list in - (add_l (add_l (add_l Env.empty nd.n_output) nd.n_local) nd.n_input) + let env = add_l (add_l (add_l Env.empty nd.n_output) nd.n_local) nd.n_input in + match nd.n_contract with + | None -> env + | Some c -> add_l env c.c_controllables in (* Check for implicit cast from linear to non-linear type *)