Fixed an infinite loop.

original commit: f21454e71141feb491c88cf7f83636ee55c76775
This commit is contained in:
Vincent St-Amour 2010-07-14 17:07:18 -04:00
parent 210446e679
commit 295b5daa2d

View File

@ -206,7 +206,18 @@
#:with real-part (unboxed-gensym)
#:with imag-part #f
#:with (bindings ...)
#`((real-part (->fl #,((optimize) #'e))))))
#`((real-part (->fl #,((optimize) #'e)))))
(pattern e:expr
#:when (isoftype? #'e -Real)
#:with real-part (unboxed-gensym)
#:with imag-part #f
#:with (bindings ...)
#`((real-part (exact->inexact #,((optimize) #'e)))))
(pattern e:expr
#:with (bindings ...)
(error "non exhaustive pattern match")
#:with real-part #f
#:with imag-part #f))
(define-syntax-class inexact-complex-unary-op
(pattern (~or (~literal real-part) (~literal flreal-part)) #:with unsafe #'unsafe-flreal-part)