aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2015-04-21 15:54:26 +0200
committerHugo Herbelin2015-04-21 15:56:56 +0200
commit7d261ef454e918c70b8fff1dd10bbe0fbdcb57a8 (patch)
tree385ed91f0215e4411d02ad81c932976758f830a0
parentce6bbd05b7d741750228956a7e045cb202ec0e74 (diff)
Fixing #3376 and #4191 (wrong index of maximally-inserted implicit argument
in the presence of let-ins).
-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).