diff options
| -rw-r--r-- | library/impargs.ml | 1 | ||||
| -rw-r--r-- | test-suite/success/implicit.v | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/library/impargs.ml b/library/impargs.ml index 52ea66de0c..f3da637de5 100644 --- a/library/impargs.ml +++ b/library/impargs.ml @@ -185,6 +185,7 @@ let add_free_rels_until strict strongly_strict revpat bound env m pos acc = | Case _ when rig -> if strict then () else iter_constr_with_full_binders push_lift (frec false) ed c + | Evar _ -> () | _ -> iter_constr_with_full_binders push_lift (frec rig) ed c in diff --git a/test-suite/success/implicit.v b/test-suite/success/implicit.v index 47c58f0450..9034d6a6f0 100644 --- a/test-suite/success/implicit.v +++ b/test-suite/success/implicit.v @@ -36,3 +36,13 @@ Check (fun x => @ rhs _ _ (f x)). Fixpoint g n := match n with O => true | S n => g n end. Inductive P n : nat -> Prop := c : P n n. + +(* Avoid evars in the computation of implicit arguments (cf r9827) *) + +Require Import List. + +Fixpoint plus n m {struct n} := + match n with + | 0 => m + | S p => S (plus p m) + end. |
