From dbdbaed50600b7ce47e2dacc12ba1e6f2a0345b4 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 3 Aug 2010 15:07:24 -0400 Subject: [PATCH] Fixed typechecking of imaginaries. --- collects/typed-scheme/typecheck/tc-expr-unit.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/typecheck/tc-expr-unit.rkt b/collects/typed-scheme/typecheck/tc-expr-unit.rkt index b5a2b2bcf7..7a42fb87a4 100644 --- a/collects/typed-scheme/typecheck/tc-expr-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-expr-unit.rkt @@ -49,7 +49,8 @@ [(~var i (3d inexact-real?)) -Flonum] [(~var i (3d real?)) -Real] ;; a complex number can't have an inexact imaginary part and an exact real part - [(~var i (3d (conjoin number? (lambda (x) (inexact-real? (imag-part x)))))) + [(~var i (3d (conjoin number? (lambda (x) (and (inexact-real? (imag-part x)) + (inexact-real? (real-part x))))))) -InexactComplex] [(~var i (3d number?)) -Number] [i:str -String]