mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
parent
fbcd624eeb
commit
e6de044b1d
@ -373,3 +373,23 @@
|
|||||||
// Error: 6-12 too many elements to destructure
|
// Error: 6-12 too many elements to destructure
|
||||||
// Hint: 6-12 the provided array has a length of 3, but the pattern expects 2 elements
|
// Hint: 6-12 the provided array has a length of 3, but the pattern expects 2 elements
|
||||||
#for (x, y) in ((1,2,3), (4,5,6)) {}
|
#for (x, y) in ((1,2,3), (4,5,6)) {}
|
||||||
|
|
||||||
|
--- issue-4573-destructuring-unclosed-delimiter ---
|
||||||
|
// Tests a case where parsing within an incorrectly predicted paren expression
|
||||||
|
// (the "outer" assignment) would put the parser in an invalid state when
|
||||||
|
// reloading a stored prediction (the "inner" assignment) and cause a panic when
|
||||||
|
// generating the unclosed delimiter error. See the comment in the issue for
|
||||||
|
// more details.
|
||||||
|
#{
|
||||||
|
(
|
||||||
|
// Error: 5-7 expected pattern, found keyword `if`
|
||||||
|
// Hint: 5-7 keyword `if` is not allowed as an identifier; try `if_` instead
|
||||||
|
// Error: 9 expected comma
|
||||||
|
// Error: 13-17 unexpected keyword `else`
|
||||||
|
// Error: 20 expected comma
|
||||||
|
if x {} else {}
|
||||||
|
// Error: 5-6 unclosed delimiter
|
||||||
|
{ () = "inner"
|
||||||
|
) = "outer"
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user