Changeset 12939


Ignore:
Timestamp:
10/02/10 19:04:00 (10 years ago)
Author:
ehuelsmann
Message:

Fix COERCE on a COMPLEX, being coerced to (COMPLEX <anything>);
this is excercised by Maxima.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/coerce.lisp

    r11391 r12939  
    106106        ((and (consp result-type)
    107107              (eq (%car result-type) 'complex))
     108         (when (complexp object)
     109           (return-from coerce
     110             (complex (coerce (realpart object) (cadr result-type))
     111                      (coerce (imagpart object) (cadr result-type)))))
    108112         (if (memq (%cadr result-type)
    109113                   '(float single-float double-float short-float long-float))
    110              (complex object 0.0)
     114             (complex (coerce object (cadr result-type))
     115                      (coerce 0.0 (cadr result-type)))
    111116             object))
    112117        ((and (consp result-type)
Note: See TracChangeset for help on using the changeset viewer.