summaryrefslogtreecommitdiff
path: root/tests/typ/compiler
diff options
context:
space:
mode:
authorMarmare314 <49279081+Marmare314@users.noreply.github.com>2023-04-11 18:44:17 +0200
committerGitHub <noreply@github.com>2023-04-11 18:44:17 +0200
commit72d8785abeff66f6b832725e71fe65d9ded803ce (patch)
tree5e9177d56e3fb34ac0888f76754a4061dacec04f /tests/typ/compiler
parent9984e73ff396b7da71bb19416f5ed15296d50d98 (diff)
fix parenthesized binding (#707)
Diffstat (limited to 'tests/typ/compiler')
-rw-r--r--tests/typ/compiler/let.typ14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/typ/compiler/let.typ b/tests/typ/compiler/let.typ
index 4518f3d4..70657617 100644
--- a/tests/typ/compiler/let.typ
+++ b/tests/typ/compiler/let.typ
@@ -33,6 +33,11 @@ Three
#test(v3, 3)
---
+// Test parenthesised assignments.
+// Ref: false
+#let (a) = (1, 2)
+
+---
// Ref: false
// Simple destructuring.
#let (a, b) = (1, 2)
@@ -41,6 +46,11 @@ Three
---
// Ref: false
+#let (a,) = (1,)
+#test(a, 1)
+
+---
+// Ref: false
// Destructuring with multiple placeholders.
#let (a, _, c, _) = (1, 2, 3, 4)
#test(a, 1)
@@ -116,10 +126,6 @@ Three
#let (a, b, c) = (1, 2)
---
-// Error: 6-9 too many elements to destructure
-#let (a) = (1, 2)
-
----
// Error: 6-20 not enough elements to destructure
#let (..a, b, c, d) = (1, 2)