summaryrefslogtreecommitdiff
path: root/tests/suite
diff options
context:
space:
mode:
authorLeedehai <18319900+Leedehai@users.noreply.github.com>2024-04-30 08:30:38 -0400
committerGitHub <noreply@github.com>2024-04-30 12:30:38 +0000
commit44bc51ba4fef66b7778668b3877a65425ac2eedc (patch)
tree751f47fb89067c43b988463e3afbce1315185599 /tests/suite
parenteac2200c978afffc3abef191364d5d5e4d6afc3b (diff)
Let let-binding raise error on unexpected keywords (#4034)
Diffstat (limited to 'tests/suite')
-rw-r--r--tests/suite/scripting/let.typ17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/suite/scripting/let.typ b/tests/suite/scripting/let.typ
index 2604c4ea..aafc6579 100644
--- a/tests/suite/scripting/let.typ
+++ b/tests/suite/scripting/let.typ
@@ -141,3 +141,20 @@ Three
// ... where this wasn't.
// Error: 12 expected equals sign
#let (a, b)
+
+--- issue-4027-let-binding-with-keyword-context ---
+// Error: 6-13 expected pattern, found keyword `context`
+// Hint: 6-13 keyword `context` is not allowed as an identifier; try `context_` instead
+#let context = 5
+
+--- issue-4027-let-binding-with-keyword-let ---
+// Error: 6-9 expected pattern, found keyword `let`
+// Hint: 6-9 keyword `let` is not allowed as an identifier; try `let_` instead
+#let let = 5
+
+--- issue-4027-let-binding-with-destructured-keywords ---
+// Error: 7-14 expected pattern, found keyword `context`
+// Hint: 7-14 keyword `context` is not allowed as an identifier; try `context_` instead
+// Error: 21-24 expected pattern, found keyword `let`
+// Hint: 21-24 keyword `let` is not allowed as an identifier; try `let_` instead
+#let (context, foo, let) = (5, 6, 7)