From ba1ff2c06d69e0fe7a379b80bf64e5f16c81d2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Wed, 27 Apr 2011 16:14:53 +0200 Subject: [PATCH] Fix qualify Svar --- compiler/heptagon/parsing/hept_scoping.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/heptagon/parsing/hept_scoping.ml b/compiler/heptagon/parsing/hept_scoping.ml index 61ad4e6..ac0e1fd 100644 --- a/compiler/heptagon/parsing/hept_scoping.ml +++ b/compiler/heptagon/parsing/hept_scoping.ml @@ -180,15 +180,18 @@ let static_app_from_app app args= let rec translate_static_exp se = try - let se_d = translate_static_exp_desc se.se_desc in + let se_d = translate_static_exp_desc se.se_loc se.se_desc in Types.mk_static_exp Tinvalid ~loc:se.se_loc se_d with | ScopingError err -> message se.se_loc err -and translate_static_exp_desc ed = +and translate_static_exp_desc loc ed = let t = translate_static_exp in match ed with - | Svar (Q q) -> Types.Svar q + | Svar (Q q) -> + let q = try qualify_const S.empty (Q q) + with Not_static -> message loc (Equal_notfound("constant", q)) + in Types.Svar q | Svar (ToQ _) -> assert false | Sint i -> Types.Sint i | Sfloat f -> Types.Sfloat f