diff options
Diffstat (limited to 'tests/typ/compiler')
| -rw-r--r-- | tests/typ/compiler/let.typ | 14 |
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) |
