propagate location for cameligo variables

This commit is contained in:
Lesenechal Remi 2020-01-02 19:30:19 +01:00
parent 3288696784
commit 4d56a71bd1

View File

@ -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