diff options
| author | herbelin | 2011-03-05 16:42:13 +0000 |
|---|---|---|
| committer | herbelin | 2011-03-05 16:42:13 +0000 |
| commit | e93656966d0ba1598f0a6d8b8e21a43c1ec73371 (patch) | |
| tree | e7ea5227765b91975bb166c206403a256418c56c /kernel | |
| parent | 93842330896c5940a1456068e72880b6481dcba8 (diff) | |
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
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/subtyping.ml | 5 |
1 files changed, 4 insertions, 1 deletions
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 = |
