From cd62792c0aefffe8b0a5c7fc76e95dfa7b86a181 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 11 Apr 2022 16:11:16 +0200 Subject: Prevent duplicate named arguments and dictionary keys --- tests/typ/code/call.typ | 4 ++++ tests/typ/code/dict.typ | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/typ/code/call.typ b/tests/typ/code/call.typ index 51ef1df5..55471774 100644 --- a/tests/typ/code/call.typ +++ b/tests/typ/code/call.typ @@ -44,6 +44,10 @@ test(adder(2)(5), 7) } +--- +// Error: 28-47 duplicate argument +#set text(family: "Arial", family: "Helvetica") + --- // Error: 2-6 expected callable or collection, found boolean {true()} diff --git a/tests/typ/code/dict.typ b/tests/typ/code/dict.typ index b369b8b6..aa840eb3 100644 --- a/tests/typ/code/dict.typ +++ b/tests/typ/code/dict.typ @@ -35,6 +35,10 @@ dict("b") += 1 } +--- +// Error: 24-32 pair has duplicate key +{(first: 1, second: 2, first: 3)} + --- // Simple expression after already being identified as a dictionary. // Error: 9-10 expected named pair, found expression -- cgit v1.2.3