From 72d8785abeff66f6b832725e71fe65d9ded803ce Mon Sep 17 00:00:00 2001 From: Marmare314 <49279081+Marmare314@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:44:17 +0200 Subject: fix parenthesized binding (#707) --- tests/typ/compiler/let.typ | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'tests') 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 @@ -32,6 +32,11 @@ Three #test(v2, 2) #test(v3, 3) +--- +// Test parenthesised assignments. +// Ref: false +#let (a) = (1, 2) + --- // Ref: false // Simple destructuring. @@ -39,6 +44,11 @@ Three #test(a, 1) #test(b, 2) +--- +// Ref: false +#let (a,) = (1,) +#test(a, 1) + --- // Ref: false // Destructuring with multiple placeholders. @@ -115,10 +125,6 @@ Three // Error: 13-14 not enough elements to destructure #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) -- cgit v1.2.3