diff options
| author | Kenji Maillard | 2019-11-04 23:44:28 +0100 |
|---|---|---|
| committer | Kenji Maillard | 2019-11-04 23:47:46 +0100 |
| commit | 5711fc6dcd9a0a566e0bbb543e9d7edb413aacf4 (patch) | |
| tree | 4452f59bcbc609e2cf0740b3cce3c5b71b7fadeb /test-suite/bugs | |
| parent | f75e1b5d8a4f679c839ffa327baa590198c69640 (diff) | |
Prevent double definition of Ltac2 constructors inside a module; Fix #11046
Diffstat (limited to 'test-suite/bugs')
| -rw-r--r-- | test-suite/bugs/closed/bug_11046.v | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/bug_11046.v b/test-suite/bugs/closed/bug_11046.v new file mode 100644 index 0000000000..c73fa78473 --- /dev/null +++ b/test-suite/bugs/closed/bug_11046.v @@ -0,0 +1,19 @@ +From Ltac2 Require Import Ltac2. + +Ltac2 Type t := [..]. +Ltac2 Type t ::= [A(int)]. + +(* t cannot be extended with two constructors with the same name *) +Fail Ltac2 Type t ::= [A(bool)]. +Fail Ltac2 Type t ::= [B | B(bool)]. + +(* constructors cannot be shadowed in the same module *) +Fail Ltac2 Type s := [A]. + +(* constructors with the same name can be defined in distinct modules *) +Module Other. + Ltac2 Type t ::= [A(bool)]. +End Other. +Module YetAnother. + Ltac2 Type t' := [A]. +End YetAnother. |
