diff options
Diffstat (limited to 'tests/typ/compiler')
| -rw-r--r-- | tests/typ/compiler/break-continue.typ | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/typ/compiler/break-continue.typ b/tests/typ/compiler/break-continue.typ index 6f505f80..4c4738bb 100644 --- a/tests/typ/compiler/break-continue.typ +++ b/tests/typ/compiler/break-continue.typ @@ -145,3 +145,18 @@ for _ in range(3) [B] ) } + +--- +// Ref: true +// Test continue while destructuring. +// Should output "one = I \ two = II \ one = I". +#for num in (1, 2, 3, 1) { + let (word, roman) = if num == 1 { + ("one", "I") + } else if num == 2 { + ("two", "II") + } else { + continue + } + [#word = #roman \ ] +} |
