From f9695eb4bc5b377a02f49ee485d7fe9be122c183 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sat, 11 Jun 2016 07:36:46 +0200 Subject: Fixing #4782 (a typing error not captured when dealing with bindings). Trying to now catch all unification errors, but without a clear view at whether some errors could be tolerated at the point of checking the type of the binding. --- test-suite/bugs/closed/4782.v | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test-suite/bugs/closed/4782.v (limited to 'test-suite') diff --git a/test-suite/bugs/closed/4782.v b/test-suite/bugs/closed/4782.v new file mode 100644 index 0000000000..4622b18d28 --- /dev/null +++ b/test-suite/bugs/closed/4782.v @@ -0,0 +1,8 @@ +(* About typing of with bindings *) + +Record r : Type := mk_r { type : Type; cond : type -> Prop }. + +Inductive p : Prop := consp : forall (e : r) (x : type e), cond e x -> p. + +Goal p. +Fail apply consp with (fun _ : bool => mk_r unit (fun x => True)) nil. -- cgit v1.2.3 From 827663982e9cdf502f21727677515cf2318aa41d Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sun, 12 Jun 2016 14:53:38 +0200 Subject: Another fix to #4782 (a typing error not captured when dealing with bindings). The tentative fix in f9695eb4b (which I was afraid it might be too strong, since it was implying failing more often) indeed broke other things (see #4813). --- test-suite/bugs/closed/4782.v | 1 + test-suite/bugs/closed/4813.v | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 test-suite/bugs/closed/4813.v (limited to 'test-suite') diff --git a/test-suite/bugs/closed/4782.v b/test-suite/bugs/closed/4782.v index 4622b18d28..ed44437861 100644 --- a/test-suite/bugs/closed/4782.v +++ b/test-suite/bugs/closed/4782.v @@ -6,3 +6,4 @@ Inductive p : Prop := consp : forall (e : r) (x : type e), cond e x -> p. Goal p. Fail apply consp with (fun _ : bool => mk_r unit (fun x => True)) nil. + diff --git a/test-suite/bugs/closed/4813.v b/test-suite/bugs/closed/4813.v new file mode 100644 index 0000000000..5f8ea74c1a --- /dev/null +++ b/test-suite/bugs/closed/4813.v @@ -0,0 +1,9 @@ +(* On the strength of "apply with" (see also #4782) *) + +Record ProverT := { Facts : Type }. +Record ProverT_correct (P : ProverT) := { Valid : Facts P -> Prop ; + Valid_weaken : Valid = Valid }. +Definition reflexivityValid (_ : unit) := True. +Definition reflexivityProver_correct : ProverT_correct {| Facts := unit |}. +Proof. + eapply Build_ProverT_correct with (Valid := reflexivityValid). -- cgit v1.2.3