diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-10-27 13:24:37 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-10-27 13:25:15 +0200 |
| commit | cbfd9884a94b55486f9b07296f23a01b34d080bd (patch) | |
| tree | fe6ea6d08b6977715c878158f5d2514efe7593cb /tests/typ/compute | |
| parent | fa81c3ece019b4667713d34cd5d7d23804045439 (diff) | |
Fix argument parsing bug
Things like `luma(1, key: "val")` didn't produce an error before because `args.finish()?` wasn't called. This changes `args: Args` to `args: &mut Args` to make it impossible for that to happen.
Diffstat (limited to 'tests/typ/compute')
| -rw-r--r-- | tests/typ/compute/construct.typ | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/typ/compute/construct.typ b/tests/typ/compute/construct.typ index d5ded96a..58693a49 100644 --- a/tests/typ/compute/construct.typ +++ b/tests/typ/compute/construct.typ @@ -117,6 +117,10 @@ #rgb(10%, 20%, 30%, false) --- +// Error: 10-20 unexpected argument: key +#luma(1, key: "val") + +--- // Error: 12-24 expected float or ratio, found string // Error: 26-39 expected float or ratio, found string #color.mix((red, "yes"), (green, "no"), (green, 10%)) |
