From 4b83bc6d9b8c3d91a098ac45d1ab20eb30e4aff7 Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Mon, 14 Mar 2005 13:00:20 +0000 Subject: [PATCH] Fixed make-random-type-containing on complexes, due to problem revealed in abcl --- ansi-tests/random-type-prop.lsp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ansi-tests/random-type-prop.lsp b/ansi-tests/random-type-prop.lsp index 7c555eac..81dd535a 100644 --- a/ansi-tests/random-type-prop.lsp +++ b/ansi-tests/random-type-prop.lsp @@ -309,7 +309,14 @@ (rcase (1 'complex) (1 'number) - #-gcl (1 `(complex ,(upgraded-complex-part-type (type-of (realpart val))))) + #-gcl (1 + (let ((t1 (type-of (realpart val))) + (t2 (type-of (imagpart val)))) + (cond + ((subtypep t1 t2) `(complex ,(upgraded-complex-part-type t2))) + ((subtypep t2 t1) `(complex ,(upgraded-complex-part-type t1))) + (t + `(complex ,(upgraded-complex-part-type `(or ,t1 ,t2))))))) (1 `(eql ,val)))) (defmethod make-random-type-containing ((val generic-function)) -- GitLab