aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/inductive.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml
index abc6ba4dfb..c0857566df 100644
--- a/kernel/inductive.ml
+++ b/kernel/inductive.ml
@@ -916,12 +916,12 @@ let check_one_cofix env nbfix def deftype =
raise (CoFixGuardError (env,RecCallInTypeOfAbstraction a))
| CoFix (j,(_,varit,vdefs as recdef)) ->
- if (List.for_all (noccur_with_meta n nbfix) args)
+ if List.for_all (noccur_with_meta n nbfix) args
then
- let nbfix = Array.length vdefs in
- if (Array.for_all (noccur_with_meta n nbfix) varit) then
+ if Array.for_all (noccur_with_meta n nbfix) varit then
+ let nbfix = Array.length vdefs in
let env' = push_rec_types recdef env in
- (Array.iter (check_rec_call env' alreadygrd (n+1) vlra) vdefs;
+ (Array.iter (check_rec_call env' alreadygrd (n+nbfix) vlra) vdefs;
List.iter (check_rec_call env alreadygrd n vlra) args)
else
raise (CoFixGuardError (env,RecCallInTypeOfDef c))