From 79fceea0244251151a8140f730523d2862476546 Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Thu, 15 Oct 2020 17:52:55 -0400 Subject: [PATCH] flat-contract-with-explanation: fix internal error Previously, `error` would raise an `exn:fail` with the following message, because it treated the first of the three strings as a format string and the other two as its arguments: > error: format string requires 0 arguments, given 2; > arguments were: > " is a procedure, to always escape when called" > " (by calling raise-blame-error with the arguments it was given"` --- racket/collects/racket/contract/private/misc.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/racket/collects/racket/contract/private/misc.rkt b/racket/collects/racket/contract/private/misc.rkt index b306337a32..0291aea6f7 100644 --- a/racket/collects/racket/contract/private/misc.rkt +++ b/racket/collects/racket/contract/private/misc.rkt @@ -1282,6 +1282,7 @@ [else (accept-or-reason (blame-add-missing-party b neg-party)) (error 'flat-contract-with-explanation - "expected that result of the first argument, when it" - " is a procedure, to always escape when called" - " (by calling raise-blame-error with the arguments it was given")]))))) + (string-append + "expected that result of the first argument, when it" + " is a procedure, to always escape when called" + " (by calling raise-blame-error with the arguments it was given"))])))))