aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-11-12 20:21:36 +0100
committerEmilio Jesus Gallego Arias2020-11-18 16:24:28 +0100
commitc609c05cf4a5a2a36ca46a0ea890c954d0ae2a5b (patch)
tree88036bf297a2b4572e6822f584fb2dbc28826385 /test-suite
parente0380f347d2ebf61b81760a365eea8c84ad3ada4 (diff)
[attributes] Deprecate `attr(true)` syntax in favor of booelan attributes.
We introduce a warning so boolean attributes are expected to be of the form `attr={yes,no}` or just `attr` (for `yes`). We update the documentation, test-suite, and changelog.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/Template.v2
-rw-r--r--test-suite/success/attribute_syntax.v18
2 files changed, 18 insertions, 2 deletions
diff --git a/test-suite/success/Template.v b/test-suite/success/Template.v
index 656362b8fc..d11ae20b8d 100644
--- a/test-suite/success/Template.v
+++ b/test-suite/success/Template.v
@@ -37,7 +37,7 @@ Module Yes.
End Yes.
Module No.
- #[universes(notemplate)]
+ #[universes(template=no)]
Inductive Box (A:Type) : Type := box : A -> Box A.
About Box.
diff --git a/test-suite/success/attribute_syntax.v b/test-suite/success/attribute_syntax.v
index b403fc120c..b866c4b074 100644
--- a/test-suite/success/attribute_syntax.v
+++ b/test-suite/success/attribute_syntax.v
@@ -16,11 +16,16 @@ Definition ι T (x: T) := x.
Check ι _ ι.
+#[universes(polymorphic=no)]
+Definition ιι T (x: T) := x.
+
+Fail Check ιι _ ιι.
+
#[program]
Fixpoint f (n: nat) {wf lt n} : nat := _.
Reset f.
-#[program(true)]
+#[program=yes]
Fixpoint f (n: nat) {wf lt n} : nat := _.
Reset f.
@@ -43,3 +48,14 @@ Export Set Foo.
Fail #[ export ] Export Foo.
(* Attribute for Locality specified twice *)
+
+(* Tests for deprecated attribute syntax *)
+Set Warnings "-deprecated-attribute-syntax".
+
+#[program(true)]
+Fixpoint f (n: nat) {wf lt n} : nat := _.
+Reset f.
+
+#[universes(monomorphic)]
+Definition ιιι T (x: T) := x.
+Fail Check ιιι _ ιιι.