From c694b91bba898aad1e071d91fa70b7c5574cbf98 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 29 Sep 2016 17:42:53 +0200 Subject: Fix bug 4969, autoapply was not tagging shelved subgoals correctly as unresolvable --- test-suite/bugs/closed/4969.v | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test-suite/bugs/closed/4969.v (limited to 'test-suite') diff --git a/test-suite/bugs/closed/4969.v b/test-suite/bugs/closed/4969.v new file mode 100644 index 0000000000..4dee41e221 --- /dev/null +++ b/test-suite/bugs/closed/4969.v @@ -0,0 +1,11 @@ +Require Import Classes.Init. + +Class C A := c : A. +Instance nat_C : C nat := 0. +Instance bool_C : C bool := true. +Lemma silly {A} `{C A} : 0 = 0 -> c = c -> True. +Proof. auto. Qed. + +Goal True. + class_apply @silly; [reflexivity|]. + reflexivity. Fail Qed. -- cgit v1.2.3 From 55cb913f029308e97bd262fc18d4338f404e7561 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 14 Feb 2017 12:35:39 +0100 Subject: don't require printing-only notation to be productive --- test-suite/success/Notations.v | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test-suite') diff --git a/test-suite/success/Notations.v b/test-suite/success/Notations.v index 07bbb60c40..32baeaa570 100644 --- a/test-suite/success/Notations.v +++ b/test-suite/success/Notations.v @@ -128,3 +128,7 @@ Notation " |- {{ a }} b" := (a=b) (no associativity, at level 10). Goal True. {{ exact I. }} Qed. + +(* Check that we can have notations without any symbol iff they are "only printing". *) +Fail Notation "" := (@nil). +Notation "" := (@nil) (only printing). -- cgit v1.2.3 From 8ce49dd1b436a17c4ee29c2893133829daac75f0 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 14 Feb 2017 12:36:15 +0100 Subject: reject notations that are both 'only printing' and 'only parsing' --- test-suite/success/Notations.v | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test-suite') diff --git a/test-suite/success/Notations.v b/test-suite/success/Notations.v index 32baeaa570..52acad7460 100644 --- a/test-suite/success/Notations.v +++ b/test-suite/success/Notations.v @@ -132,3 +132,6 @@ Qed. (* Check that we can have notations without any symbol iff they are "only printing". *) Fail Notation "" := (@nil). Notation "" := (@nil) (only printing). + +(* Check that a notation cannot be neither parsing nor printing. *) +Fail Notation "'foobarkeyword'" := (@nil) (only parsing, only printing). -- cgit v1.2.3