~ chicken-core (chicken-5) fa3818e0485061ed60565b2f3861c9a16913e245
commit fa3818e0485061ed60565b2f3861c9a16913e245
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Tue Jan 29 10:38:09 2019 +1300
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Sat Mar 9 20:29:07 2019 +1300
Fix grammar of "(1|2) argument[s] (is|are) expected" scrutiny message
diff --git a/scrutinizer.scm b/scrutinizer.scm
index 6b96429e..605ce137 100644
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -2524,7 +2524,7 @@
"~%~%"
"~a"
"~%~%"
- "Procedure `~a' is called with ~a argument~a but ~a argument~a is expected."
+ "Procedure `~a' is called with ~a argument~a but ~a argument~a ~a expected."
"~%~%"
"Procedure ~a has type"
"~%~%"
@@ -2533,6 +2533,7 @@
(strip-namespace pname)
argc (multiples argc)
exp-count (multiples exp-count)
+ (if (= exp-count 1) "is" "are")
(variable-from-module pname)
(type->pp-string ptype)))
diff --git a/tests/scrutinizer-message-format.expected b/tests/scrutinizer-message-format.expected
index 992aa4e1..735ad5fa 100644
--- a/tests/scrutinizer-message-format.expected
+++ b/tests/scrutinizer-message-format.expected
@@ -11,7 +11,7 @@ Warning: Type mismatch (test-scrutinizer-message-format.scm:XXX)
(scheme#cons '())
- Procedure `cons' is called with 1 argument but 2 arguments is expected.
+ Procedure `cons' is called with 1 argument but 2 arguments are expected.
Procedure `cons', imported from `scheme', has type
@@ -255,7 +255,7 @@ Warning: Type mismatch (test-scrutinizer-message-format.scm:XXX)
(scheme#cons '())
- Procedure `cons' is called with 1 argument but 2 arguments is expected.
+ Procedure `cons' is called with 1 argument but 2 arguments are expected.
Procedure `cons', imported from `scheme', has type
Trap