summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-27 12:12:43 +0100
committerGitHub <noreply@github.com>2024-02-27 11:12:43 +0000
commit0aa925435628f5a6f29478e7e19ed2d4f50eabf8 (patch)
treec977b46f5f005f178393d53a3236b8629817ff38 /tests
parent9646a132a80d11b37649b82c419833003ac7f455 (diff)
Fix bugs with parenthesized expression parsing (#3505)
Diffstat (limited to 'tests')
-rw-r--r--tests/typ/bugs/parenthesized.typ12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/typ/bugs/parenthesized.typ b/tests/typ/bugs/parenthesized.typ
index 6901158e..f8f3190f 100644
--- a/tests/typ/bugs/parenthesized.typ
+++ b/tests/typ/bugs/parenthesized.typ
@@ -84,3 +84,15 @@
// Here, `a` is not duplicate, where it was previously identified as one.
#let f((a: b), (c,), a) = (a, b, c)
#test(f((a: 1), (2,), 3), (3, 1, 2))
+
+---
+// Ensure that we can't have non-atomic closures.
+#let x = 1
+#let c = [#(x) => (1, 2)]
+#test(c.children.last(), [(1, 2)]))
+
+---
+// Ensure that we can't have non-atomic destructuring.
+#let x = 1
+#let c = [#() = ()]
+#test(c.children.last(), [()])