diff options
| author | frozolotl <44589151+frozolotl@users.noreply.github.com> | 2025-05-20 18:24:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-20 16:24:46 +0000 |
| commit | d42d2ed200c8f3f167ee09be69fcf86f4b645971 (patch) | |
| tree | c018f7b7312f8ec4788670d594d7fbbf56b31c3e /crates | |
| parent | e90c2f74ef63d92fc160ba5ba04b780c1a64fe75 (diff) | |
Error if an unexpected named argument was received (#6192)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-eval/src/call.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crates/typst-eval/src/call.rs b/crates/typst-eval/src/call.rs index 1ca7b4b8..6a57c85e 100644 --- a/crates/typst-eval/src/call.rs +++ b/crates/typst-eval/src/call.rs @@ -404,12 +404,14 @@ fn wrap_args_in_math( if trailing_comma { body += SymbolElem::packed(','); } - Ok(Value::Content( - callee.display().spanned(callee_span) - + LrElem::new(SymbolElem::packed('(') + body + SymbolElem::packed(')')) - .pack() - .spanned(args.span), - )) + + let formatted = callee.display().spanned(callee_span) + + LrElem::new(SymbolElem::packed('(') + body + SymbolElem::packed(')')) + .pack() + .spanned(args.span); + + args.finish()?; + Ok(Value::Content(formatted)) } /// Provide a hint if the callee is a shadowed standard library function. |
