diff --git a/ansi-tests/random-type-prop.lsp b/ansi-tests/random-type-prop.lsp index 7c555eaccd1b65bdd29872d89d3ee1c4870389d6..81dd535a691a11fe8f1eca04c9ac076253efff9f 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))