From ae725653119850851c72c8fdce5ee0ed1ccbf031 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Tue, 23 Dec 2008 00:44:04 +0000 Subject: [PATCH] CLHS says the interval designator should have the same type as the type. Make it so for FLOAT. Previously, we allowed any integers to be used. This makes the behavior of FLOAT match SINGLE-FLOAT and DOUBLE-FLOAT which signaled errors if the bound wasn't a float of the specified type. --- code/type.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/type.lisp b/code/type.lisp index 56c0e09be..de59aa991 100644 --- a/code/type.lisp +++ b/code/type.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/type.lisp,v 1.78 2008/12/22 22:10:36 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/type.lisp,v 1.79 2008/12/23 00:44:04 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -2410,6 +2410,8 @@ ,(coerced-real-bound high 'rational))))) (def-type-translator float (&optional (low '*) (high '*)) + (check-bound low float) + (check-bound high float) (specifier-type `(or (single-float ,(coerced-float-bound low 'single-float) ,(coerced-float-bound high 'single-float)) -- GitLab