From 109c90efd0dd2bfbeb6c29b263ccd9b2e84e5b9e Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Mon, 25 Aug 2014 21:46:26 +0200 Subject: Fixing bug #3377 by giving env and sigma to constrMathching. Now it's possible to match on a primitive projection application c.(p) using "?f _", binding f to (fun x => x.(p)) with the correct typing. --- test-suite/bugs/closed/3377.v | 17 +++++++++++++++++ test-suite/bugs/opened/3377.v | 9 --------- 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 test-suite/bugs/closed/3377.v delete mode 100644 test-suite/bugs/opened/3377.v (limited to 'test-suite') diff --git a/test-suite/bugs/closed/3377.v b/test-suite/bugs/closed/3377.v new file mode 100644 index 0000000000..8e9e3933cc --- /dev/null +++ b/test-suite/bugs/closed/3377.v @@ -0,0 +1,17 @@ +Set Primitive Projections. +Set Implicit Arguments. +Record prod A B := pair { fst : A; snd : B}. + +Goal fst (@pair Type Type Type Type). +Set Printing All. +match goal with |- ?f ?x => set (foo := f x) end. + +Goal forall x : prod Set Set, x = @pair _ _ (fst x) (snd x). +Proof. + intro x. + lazymatch goal with + | [ |- ?x = @pair _ _ (?f ?x) (?g ?x) ] => pose f + end. + +(* Toplevel input, characters 7-44: +Error: No matching clauses for match. *) diff --git a/test-suite/bugs/opened/3377.v b/test-suite/bugs/opened/3377.v deleted file mode 100644 index 23c0a965c8..0000000000 --- a/test-suite/bugs/opened/3377.v +++ /dev/null @@ -1,9 +0,0 @@ -Set Primitive Projections. -Set Implicit Arguments. -Record prod A B := pair { fst : A; snd : B}. - -Goal fst (@pair Type Type Type Type). -Set Printing All. -Fail match goal with |- ?f _ => idtac end. -(* Toplevel input, characters 7-44: -Error: No matching clauses for match. *) -- cgit v1.2.3