diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-11-06 11:07:13 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-11-06 11:07:13 +0000 |
commit | 628dba6f3c82ec771dcc567ba163a7fc96e48cf2 (patch) | |
tree | b99c8243db428ab0bbca75f8037c3fe6dcd92f72 | |
parent | 84bbb2fd6f493112b43008a922b39e18e72dae54 (diff) |
Bug dans le traitement des declarations de primitives.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@404 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | bytecomp/translmod.ml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bytecomp/translmod.ml b/bytecomp/translmod.ml index 2867194de..444e3c031 100644 --- a/bytecomp/translmod.ml +++ b/bytecomp/translmod.ml @@ -84,7 +84,7 @@ let rec transl_module env cc mexp = Lfunction(param', Llet(param, apply_coercion ccarg (Lvar param'), transl_module env ccres body)) - | Tcoerce_structure _ -> + | _ -> fatal_error "Translmod.transl_module" end | Tmod_apply(funct, arg, ccarg) -> @@ -103,9 +103,12 @@ and transl_structure env fields cc = function | Tcoerce_structure pos_cc_list -> let v = Array.of_list (List.rev fields) in Lprim(Pmakeblock 0, - List.map (fun (pos, cc) -> - apply_coercion cc (transl_access env v.(pos))) - pos_cc_list) + List.map + (fun (pos, cc) -> + match cc with + Tcoerce_primitive p -> transl_primitive p + | _ -> apply_coercion cc (transl_access env v.(pos))) + pos_cc_list) | Tcoerce_functor(_, _) -> fatal_error "Translmod.transl_structure" end |