From 24a0bd8cfb170a002b5266e4dfd3da007b4fc145 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 27 Oct 2023 15:37:00 +0200 Subject: Fix error priority for function arguments Errors about superfluous arguments are now thrown before errors of the function execution itself. Fixes #1367 --- tests/typ/compiler/array.typ | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/typ/compiler') diff --git a/tests/typ/compiler/array.typ b/tests/typ/compiler/array.typ index 2ce47158..67b8abc3 100644 --- a/tests/typ/compiler/array.typ +++ b/tests/typ/compiler/array.typ @@ -313,6 +313,10 @@ // Error: 2-26 cannot compare 3em with 2pt #(1pt, 2pt, 3em).sorted() +--- +// Error: 42-52 unexpected argument +#((k: "a", v: 2), (k: "b", v: 1)).sorted(it => it.v) + --- // Error: 2-18 array index out of bounds (index: -4, len: 3) and no default value was specified #(1, 2, 3).at(-4) -- cgit v1.2.3