From 4d56a71bd1ab74f90c88387180b67a9352370302 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Thu, 2 Jan 2020 19:30:19 +0100 Subject: [PATCH] propagate location for cameligo variables --- src/passes/2-simplify/cameligo.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/passes/2-simplify/cameligo.ml b/src/passes/2-simplify/cameligo.ml index b2bef414c..7dbb027d7 100644 --- a/src/passes/2-simplify/cameligo.ml +++ b/src/passes/2-simplify/cameligo.ml @@ -327,9 +327,9 @@ let rec simpl_expression : let%bind type_expr' = simpl_type_expression type_expr in return @@ e_annotation ~loc expr' type_expr' | EVar c -> - let c' = c.value in + let (c',loc) = r_split c in (match constants c' with - | Error _ -> return @@ e_variable (Var.of_name c.value) + | Error _ -> return @@ e_variable ~loc (Var.of_name c.value) | Ok (s,_) -> return @@ e_constant s []) | ECall x -> ( let ((e1 , e2) , loc) = r_split x in