summaryrefslogtreecommitdiffstats
path: root/typing
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2014-12-19 07:20:00 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2014-12-19 07:20:00 +0000
commit583395b0c6b1f7dbff733c1a7468a0fb2c76cf13 (patch)
tree8a1e072e966392c648ae9f9982ba7210ae5bafae /typing
parentd7bac4efb2c8306808b97292f032fe5756429884 (diff)
Fix PR#6726: Access to the wrong field of aliased module
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15681 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing')
-rw-r--r--typing/mtype.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/typing/mtype.ml b/typing/mtype.ml
index 873ba3a23..ec5fa6922 100644
--- a/typing/mtype.ml
+++ b/typing/mtype.ml
@@ -44,7 +44,9 @@ and strengthen_sig env sg p pos =
match sg with
[] -> []
| (Sig_value(id, desc) as sigelt) :: rem ->
- sigelt :: strengthen_sig env rem p (pos+1)
+ let pos =
+ match desc with {val_kind = Val_prim _} -> pos | _ -> pos+1 in
+ sigelt :: strengthen_sig env rem p pos
| Sig_type(id, decl, rs) :: rem ->
let newdecl =
match decl.type_manifest, decl.type_private, decl.type_kind with