From 3c0e17d9632fffa521f633afedd39efefe3ec5c7 Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Mon, 23 Feb 2009 18:49:29 +0000 Subject: [PATCH] Add to the error message for -> in the case of optional arguments. svn: r13803 --- collects/scheme/private/contract-arrow.ss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/collects/scheme/private/contract-arrow.ss b/collects/scheme/private/contract-arrow.ss index ed9a29eda4..757353d83c 100644 --- a/collects/scheme/private/contract-arrow.ss +++ b/collects/scheme/private/contract-arrow.ss @@ -1427,11 +1427,14 @@ v4 todo: src-info blame orig-str - "expected a ~a that accepts ~a~a argument~a~a, given: ~e" + "expected a ~a that accepts ~a~a~a argument~a~a~a, given: ~e" (if mtd? "method" "procedure") (if (zero? dom-length) "no" dom-length) + (if (null? optionals) "" " mandatory") (if (null? mandatory-kwds) "" " ordinary") (if (= 1 dom-length) "" "s") + (if (zero? optionals) "" + (format " and up to ~a optional argument~a" optionals (if (= 1 optionals) "" "s"))) (keyword-error-text mandatory-kwds optional-keywords) val)))