From c21628133ecec7adf6ffb949c01b1e3e11312f58 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Thu, 12 May 2011 17:49:56 -0400 Subject: [PATCH] Add extra checks to avoid spurious close call reporting involving integer operations. original commit: 526a84f10b0dc08ffb8f0cbc52b08d7a441487ba --- .../optimizer/close-calls/real-in-float-expr.rkt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/collects/tests/typed-scheme/optimizer/close-calls/real-in-float-expr.rkt b/collects/tests/typed-scheme/optimizer/close-calls/real-in-float-expr.rkt index f68872af..eab3d8be 100644 --- a/collects/tests/typed-scheme/optimizer/close-calls/real-in-float-expr.rkt +++ b/collects/tests/typed-scheme/optimizer/close-calls/real-in-float-expr.rkt @@ -1,10 +1,12 @@ #; ( - real-in-float-expr.rkt 12:0 (#%app * (quote 3) (quote 2.3)) -- binary, args all float-arg-expr, return type not Float -- caused by: 10:8 (quote 3) - real-in-float-expr.rkt 18:0 (#%app * (quote 2) (quote 2.0)) -- binary, args all float-arg-expr, return type not Float -- caused by: 17:8 (quote 2) + real-in-float-expr.rkt 14:0 (#%app * (quote 3) (quote 2.3)) -- binary, args all float-arg-expr, return type not Float -- caused by: 14:8 (quote 3) + real-in-float-expr.rkt 22:0 (#%app * (quote 2) (quote 2.0)) -- binary, args all float-arg-expr, return type not Float -- caused by: 22:8 (quote 2) 6.8999999999999995 6 5 + 6 + 5 4.0 ) #lang typed/racket @@ -14,5 +16,7 @@ (* (ann 2 Integer) (ann 3 Integer)) ; but these have nothing to do with floats, should not be logged (+ (ann 2 Integer) (ann 3 Integer)) +(* 2 3) +(+ 2 3) (* (ann 2 Natural) 2.0) ; close calls that result in Nonnegative-Real and co (i.e. not directly Real) should be reported too