Use ChoiceFormat for better plurals in error messages (#1848)

This commit is contained in:
Jen Basch authored and GitHub committed 2026-09-10 22:03:05 +00:00
1 parent 90245589b6
commit 574ad844f3
6 files changed
+30 -11

No files matched your search

@@ -1,2 +1,2 @@
f = (a1, a2, a3) -> a1
res = f.applyToList(List(1, 2, 3, 4, 5, 6))
f = (a1, a2) -> a1
res = f.applyToList(List(1, 2, 3, 4, 5, 6))
@@ -1,8 +1,8 @@
–– Pkl Error ––
Expected 3 function arguments but got 6.
Expected 2 function arguments but got 6.
x | f = (a1, a2, a3) -> a1
^^^^^^^^^^^^^^^^^^
x | f = (a1, a2) -> a1
^^^^^^^^^^^^^^
at wrongArgumentListLength#f.<function#1> (file:///$snippetsDir/input/lambdas/wrongArgumentListLength.pkl)
x | res = f.applyToList(List(1, 2, 3, 4, 5, 6))