aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interp/constrintern.ml2
-rw-r--r--test-suite/bugs/closed/4191.v5
2 files changed, 6 insertions, 1 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 5151d2a10a..8f0d56c5bd 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -1913,7 +1913,7 @@ let interp_rawcontext_evars env evdref bl =
| Some b ->
let c = understand_judgment_tcc env evdref b in
let d = (na, Some c.uj_val, c.uj_type) in
- (push_rel d env, d::params, succ n, impls))
+ (push_rel d env, d::params, n, impls))
(env,[],1,[]) (List.rev bl)
in (env, par), impls
diff --git a/test-suite/bugs/closed/4191.v b/test-suite/bugs/closed/4191.v
new file mode 100644
index 0000000000..290bb384d9
--- /dev/null
+++ b/test-suite/bugs/closed/4191.v
@@ -0,0 +1,5 @@
+(* Test maximal implicit arguments in the presence of let-ins *)
+Definition foo (x := 1) {y : nat} (H : y = y) : True := I.
+Definition bar {y : nat} (x := 1) (H : y = y) : True := I.
+Check bar (eq_refl 1).
+Check foo (eq_refl 1).