From e93656966d0ba1598f0a6d8b8e21a43c1ec73371 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sat, 5 Mar 2011 16:42:13 +0000 Subject: Fixed a "feature" about subtyping records: one was expected not only that the fields had the same names but that the parameters of the record had exactly the same names too. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13879 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/subtyping.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/subtyping.ml b/kernel/subtyping.ml index 93844ce5bd..2612afca6b 100644 --- a/kernel/subtyping.ml +++ b/kernel/subtyping.ml @@ -180,7 +180,10 @@ let check_inductive cst env mp1 l info1 mp2 mib2 spec2 subst1 subst2 reso1 reso2 assert (Array.length mib2.mind_packets = 1); assert (Array.length mib1.mind_packets.(0).mind_user_lc = 1); assert (Array.length mib2.mind_packets.(0).mind_user_lc = 1); - check (fun mib -> names_prod_letin mib.mind_packets.(0).mind_user_lc.(0)); + check (fun mib -> + let nparamdecls = List.length mib.mind_params_ctxt in + let names = names_prod_letin (mib.mind_packets.(0).mind_user_lc.(0)) in + snd (list_chop nparamdecls names)); end; (* we first check simple things *) let cst = -- cgit v1.2.3