diff options
| -rw-r--r-- | pretyping/inductiveops.ml | 10 | ||||
| -rw-r--r-- | test-suite/failure/fixpoint2.v | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml index f7d0843822..66f3456439 100644 --- a/pretyping/inductiveops.ml +++ b/pretyping/inductiveops.ml @@ -400,9 +400,13 @@ let control_only_guard env c = | Fix (_,(_,_,_) as fix) -> Inductive.check_fix e fix | _ -> () - in - iter_constr_with_full_binders push_rel check_fix_cofix env c - + in + let rec iter env c = + check_fix_cofix env c; + iter_constr_with_full_binders push_rel iter env c + in + iter env c + let subst_inductive subst (kn,i as ind) = let kn' = Mod_subst.subst_kn subst kn in if kn == kn' then ind else (kn',i) diff --git a/test-suite/failure/fixpoint2.v b/test-suite/failure/fixpoint2.v new file mode 100644 index 0000000000..d2f02ea138 --- /dev/null +++ b/test-suite/failure/fixpoint2.v @@ -0,0 +1,6 @@ +(* Check Guard in proofs *) + +Goal nat->nat. +fix f 1. +intro n; apply f; assumption. +Guarded. |
