diff options
-rw-r--r-- | test-suite/bugs/closed/4582.v | 10 | ||||
-rw-r--r-- | theories/Lists/List.v | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test-suite/bugs/closed/4582.v b/test-suite/bugs/closed/4582.v new file mode 100644 index 000000000..0842fb8fa --- /dev/null +++ b/test-suite/bugs/closed/4582.v @@ -0,0 +1,10 @@ +Require List. +Import List.ListNotations. + +Variable Foo : nat -> nat. + +Delimit Scope Foo_scope with F. + +Notation " [ x ] " := (Foo x) : Foo_scope. + +Check ([1] : nat)%F. diff --git a/theories/Lists/List.v b/theories/Lists/List.v index cc7586fec..957f1066d 100644 --- a/theories/Lists/List.v +++ b/theories/Lists/List.v @@ -26,7 +26,7 @@ In a special module to avoid conflicts. *) Module ListNotations. Notation " [ ] " := nil (format "[ ]") : list_scope. Notation " [ x ] " := (cons x nil) : list_scope. -Notation " [ x ; .. ; y ] " := (cons x .. (cons y nil) ..) : list_scope. +Notation " [ x ; y ; .. ; z ] " := (cons x (cons y .. (cons z nil) ..)) : list_scope. End ListNotations. Import ListNotations. |