From dabc5b302ebbc07ea9d116095550634eb515c74b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 15 Apr 2018 19:16:38 -0700 Subject: [PATCH] Change guarantee to show context of error. --- src/runtime/boot.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/boot.scm b/src/runtime/boot.scm index 0a36e5200..7ac9cd8fd 100644 --- a/src/runtime/boot.scm +++ b/src/runtime/boot.scm @@ -403,9 +403,9 @@ USA. (set-predicate<=! p1 p2)))) (define (guarantee predicate object #!optional caller) - (if (predicate object) - object - (error:not-a predicate object caller))) + (if (not (predicate object)) + (error:not-a predicate object caller)) + object) (define (error:not-a predicate object #!optional caller) (error:wrong-type-argument object (predicate-description predicate) caller)) -- 2.25.1