aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parsing/pptactic.ml5
-rw-r--r--test-suite/failure/coqbugs0266.v7
2 files changed, 11 insertions, 1 deletions
diff --git a/parsing/pptactic.ml b/parsing/pptactic.ml
index 8f313f1f37..f729ccd3cc 100644
--- a/parsing/pptactic.ml
+++ b/parsing/pptactic.ml
@@ -486,8 +486,11 @@ and pr_atom1 = function
hov 1 (str "Generalize" ++ spc () ++ str "Dependent" ++ spc () ++
pr_constr c)
| TacLetTac (id,c,cl) ->
+ let pcl = match cl with
+ {onhyps=None;onconcl=true;concl_occs=[]} -> mt()
+ | _ -> pr_clauses pr_ident cl in
hov 1 (str "LetTac" ++ spc () ++ pr_id id ++ str ":=" ++
- pr_constr c ++ pr_clauses pr_ident cl)
+ pr_constr c ++ pcl)
| TacInstantiate (n,c,cls) ->
hov 1 (str "Instantiate" ++ pr_arg int n ++ pr_arg pr_constr c ++
pr_clauses pr_ident cls)
diff --git a/test-suite/failure/coqbugs0266.v b/test-suite/failure/coqbugs0266.v
new file mode 100644
index 0000000000..2ac6c4f0eb
--- /dev/null
+++ b/test-suite/failure/coqbugs0266.v
@@ -0,0 +1,7 @@
+(* It is forbidden to erase a variable (or a local def) that is used in
+ the current goal. *)
+Section S.
+Local a:=O.
+Definition b:=a.
+Goal b=b.
+Clear a.