diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compiler/closure.typ | 4 | ||||
| -rw-r--r-- | tests/typ/compiler/let.typ | 20 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/typ/compiler/closure.typ b/tests/typ/compiler/closure.typ index 915de850..2d12a2bc 100644 --- a/tests/typ/compiler/closure.typ +++ b/tests/typ/compiler/closure.typ @@ -170,3 +170,7 @@ --- // Error: 10-14 expected identifier, found `none` #let foo(none: b) = key + +--- +// Error: 11 expected comma +#let foo(_: 3) = none diff --git a/tests/typ/compiler/let.typ b/tests/typ/compiler/let.typ index 70657617..160d2147 100644 --- a/tests/typ/compiler/let.typ +++ b/tests/typ/compiler/let.typ @@ -222,6 +222,26 @@ Three #let (..true) = false --- +#let _ = 4 + +#for _ in range(2) [] + +// Error: 2-3 unexpected underscore +#_ + +// Error: 8-9 unexpected underscore +#lorem(_) + +// Error: 3-4 expected expression, found underscore +#(_,) + +// Error: 3-4 expected expression, found underscore +#{_} + +// Error: 8-9 expected expression, found underscore +#{ 1 + _ } + +--- // Error: 13 expected equals sign #let func(x) |
