diff options
| author | Malo <57839069+MDLC01@users.noreply.github.com> | 2024-12-20 12:15:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-20 11:15:14 +0000 |
| commit | 39706fe42f269b3a283eeff9b595480631737159 (patch) | |
| tree | 683bafcfddd6c897e5868b3d911ac41c2973be36 /tests | |
| parent | 69536853589016b60efef4d9e39f8bb811040980 (diff) | |
Error on duplicate symbol variant with modifiers in different orders (#5587)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/suite/symbols/symbol.typ | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/tests/suite/symbols/symbol.typ b/tests/suite/symbols/symbol.typ index f2f6abf8..4c64700a 100644 --- a/tests/suite/symbols/symbol.typ +++ b/tests/suite/symbols/symbol.typ @@ -39,13 +39,49 @@ ("invalid. id!", "x") ) +--- symbol-constructor-duplicate-modifier --- +// Error: 2:3-2:31 duplicate modifier within variant: "duplicate" +// Hint: 2:3-2:31 modifiers are not ordered, so each one may appear only once +#symbol( + ("duplicate.duplicate", "x"), +) + +--- symbol-constructor-duplicate-default-variant --- +// Error: 3:3-3:6 duplicate default variant +#symbol( + "x", + "y", +) + +--- symbol-constructor-duplicate-empty-variant --- +// Error: 3:3-3:12 duplicate default variant +#symbol( + ("", "x"), + ("", "y"), +) + +--- symbol-constructor-default-and-empty-variants --- +// Error: 3:3-3:12 duplicate default variant +#symbol( + "x", + ("", "y"), +) + --- symbol-constructor-duplicate-variant --- -// Error: 3:3-3:29 duplicate variant +// Error: 3:3-3:29 duplicate variant: "duplicate.variant" #symbol( ("duplicate.variant", "x"), ("duplicate.variant", "y"), ) +--- symbol-constructor-duplicate-variant-different-order --- +// Error: 3:3-3:29 duplicate variant: "variant.duplicate" +// Hint: 3:3-3:29 variants with the same modifiers are identical, regardless of their order +#symbol( + ("duplicate.variant", "x"), + ("variant.duplicate", "y"), +) + --- symbol-unknown-modifier --- // Error: 13-20 unknown symbol modifier #emoji.face.garbage |
