1.0.42.16: better RANDOM type-error reporting
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 1 Sep 2010 15:27:07 +0000 (15:27 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 1 Sep 2010 15:27:07 +0000 (15:27 +0000)
 * Since RANDOM has an explicit check for the type, use the EXPLICIT-CHECK
   flag in the DEFKNOWN...

 * Patch by Stas Boukarev, lp#598986.

NEWS
src/compiler/fndb.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 16dbb31..0cbd098 100644 (file)
--- 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
index dfb0dcd..9f43517 100644 (file)
 (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) (*))
index 7382b6f..2b80b06 100644 (file)
@@ -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"