From: Nikodemus Siivola Date: Wed, 1 Sep 2010 15:27:07 +0000 (+0000) Subject: 1.0.42.16: better RANDOM type-error reporting X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=93318936826bae5951fcd11c0300cec4d3288360;p=sbcl.git 1.0.42.16: better RANDOM type-error reporting * Since RANDOM has an explicit check for the type, use the EXPLICIT-CHECK flag in the DEFKNOWN... * Patch by Stas Boukarev, lp#598986. --- diff --git a/NEWS b/NEWS index 16dbb31..0cbd098 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ changes relative to sbcl-1.0.42 initialization arguments to MAKE-ARRAY can be stack allocated. (lp#586105) * bug fix: inline-expansion creating references to dead lambda-variables (lp#454681, thanks to Alexey Dejneka) + * bug fix: better error message for bogus numerical arguments to RANDOM. + (lp#598986, thanks to Stas Boukarev) changes in sbcl-1.0.42 relative to sbcl-1.0.41 * build changes diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index dfb0dcd..9f43517 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -380,7 +380,8 @@ (defknown deposit-field (integer byte-specifier integer) integer (movable foldable flushable)) (defknown random ((or (float (0.0)) (integer 1)) &optional random-state) - (or (float 0.0) (integer 0)) ()) + (or (float 0.0) (integer 0)) + (explicit-check)) (defknown make-random-state (&optional (or (member nil t) random-state unsigned-byte (simple-array (unsigned-byte 8) (*)) diff --git a/version.lisp-expr b/version.lisp-expr index 7382b6f..2b80b06 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.42.15" +"1.0.42.16"