summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Campbell2019-07-29 17:49:15 +0100
committerBrian Campbell2019-07-29 17:53:06 +0100
commitef0082e8e9d6ec05be507a402ca3e4ac64f297cd (patch)
treeffbcc976a53f55fca86de56b25471ded683417ec /src
parent3d753e69785533a578483acd835ad65b3d72bc49 (diff)
Add type check after descattering to keep type environments up to date
Diffstat (limited to 'src')
-rw-r--r--src/sail.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sail.ml b/src/sail.ml
index e9b1914d..ddea4a41 100644
--- a/src/sail.ml
+++ b/src/sail.ml
@@ -410,6 +410,9 @@ let load_files ?check:(check=false) type_envs files =
else
let ast = Scattered.descatter ast in
let ast, type_envs = rewrite_ast_initial type_envs ast in
+ (* Recheck after descattering so that the internal type environments always
+ have complete variant types *)
+ let ast, type_envs = Type_error.check Type_check.initial_env ast in
let out_name = match !opt_file_out with
| None when parsed = [] -> "out.sail"