Skip to content
  • Raymond Toy's avatar
    Fix #58: Bogus type error in comparison of complex number with `THE` form · bccd6a98
    Raymond Toy authored
    The deftransforms `upgraded-complex-real-contagion-arg1` and
    `upgraded-complex-real-contagion-arg2` were coercing the complex
    number to the exact type of the float number.  Because of the `THE`
    form, the type of the float was `(member 1d0)`, so the compiler was
    coercing `#c(1/2 1/2)` to `(complex (double-float 1d0))`, which is
    wrong.
    
    Therefore, coerce the complex to just the type format of the real
    part, ignoring any bounds.
    
    * src/compiler/float-tran.lisp
      * Coerce to format type, discarding any bounds
    * src/general-info/release-21d.md
      * Update notes
    * tests/issues.lisp
      * Added test for this
    bccd6a98