aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2016-09-29 10:46:53 +0200
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2016-09-29 10:47:00 +0200
commita6832ccfacd9c105b23a9a77dadc3202f7af26fc (patch)
tree0e425553775feca6d35ebe1e6466477008d542a3
parente1df1b77f8c72636b6e347f41f6f38976c86e909 (diff)
Argument : assert does fail if no arg is given (fix #4864)
-rw-r--r--test-suite/output/Arguments.v2
-rw-r--r--test-suite/success/simpl_tuning.v2
-rw-r--r--toplevel/vernacentries.ml4
3 files changed, 4 insertions, 4 deletions
diff --git a/test-suite/output/Arguments.v b/test-suite/output/Arguments.v
index 05eeaac63..bd9240476 100644
--- a/test-suite/output/Arguments.v
+++ b/test-suite/output/Arguments.v
@@ -17,7 +17,7 @@ Definition fcomp A B C f (g : A -> B) (x : A) : C := f (g x).
Arguments fcomp {_ _ _}%type_scope f g x /.
About fcomp.
Definition volatile := fun x : nat => x.
-Arguments volatile /.
+Arguments volatile / _.
About volatile.
Set Implicit Arguments.
Section S1.
diff --git a/test-suite/success/simpl_tuning.v b/test-suite/success/simpl_tuning.v
index d4191b939..2728672f3 100644
--- a/test-suite/success/simpl_tuning.v
+++ b/test-suite/success/simpl_tuning.v
@@ -106,7 +106,7 @@ match goal with |- (f (g x1), h x2) = (f (g x1), h x2) => idtac end.
Abort.
Definition volatile := fun x : nat => x.
-Arguments volatile /.
+Arguments volatile / _.
Lemma foo : volatile = volatile.
simpl.
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 48a85b709..382a71629 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -986,9 +986,9 @@ let vernac_declare_arguments locality r l nargs flags =
| _::li, _::ld, _::ls -> check li ld ls
| _ -> assert false in
let () = match l with
- | [[]] -> ()
+ | [[]] when List.exists ((<>) `Assert) flags -> ()
| _ ->
- List.iter2 (fun l -> check inf_names l) (names :: rest) scopes
+ List.iter2 (check inf_names) (names :: rest) scopes
in
(* we take extra scopes apart, and we check they are consistent *)
let l, scopes =