diff options
| author | Malo <57839069+MDLC01@users.noreply.github.com> | 2024-04-18 14:20:05 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-05-17 14:27:59 +0200 |
| commit | ac7dff10b27ed387bd936c5df8a9e7937b75c86d (patch) | |
| tree | 412033bb8549e9cdd7c9c88d50fb518b1ddce184 /tests | |
| parent | 03c30556dbb7a350dae3e5ff1d2404584f80ee6e (diff) | |
Fix compiler panic on stack with infinite spacing (#3918)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/suite/layout/grid/grid.typ | 9 | ||||
| -rw-r--r-- | tests/suite/layout/stack.typ | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/suite/layout/grid/grid.typ b/tests/suite/layout/grid/grid.typ index f4f0b90a..2d45095d 100644 --- a/tests/suite/layout/grid/grid.typ +++ b/tests/suite/layout/grid/grid.typ @@ -274,3 +274,12 @@ The following: [], [a] ) + +--- issue-3917-grid-with-infinite-width --- +// https://github.com/typst/typst/issues/1918 +#set page(width: auto) +#context layout(available => { + let infinite-length = available.width + // Error: 3-50 cannot create grid with infinite width + grid(gutter: infinite-length, columns: 2)[A][B] +}) diff --git a/tests/suite/layout/stack.typ b/tests/suite/layout/stack.typ index 1eca52c9..aad273a5 100644 --- a/tests/suite/layout/stack.typ +++ b/tests/suite/layout/stack.typ @@ -80,3 +80,12 @@ World! 🌍 stack([a], 1fr, [b]), stack([a], v(1fr), [b]), ) + +--- issue-1918-stack-with-infinite-spacing --- +// https://github.com/typst/typst/issues/1918 +#set page(width: auto) +#context layout(available => { + let infinite-length = available.width + // Error: 3-40 stack spacing is infinite + stack(spacing: infinite-length)[A][B] +}) |
