From 6a4eeea99f6829ea05d337dcccf54c2525a67be4 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Mon, 24 Mar 2014 20:27:54 -0700 Subject: [PATCH] Make Bottom not a special case for tc-any-results. original commit: fcedc4ab59e4d6f21d396cf3ed1979155b75a337 --- .../typed-racket-lib/typed-racket/typecheck/check-below.rkt | 2 +- .../tests/typed-racket/unit-tests/check-below-tests.rkt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-below.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-below.rkt index bd5755a9..b20f4bbb 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-below.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-below.rkt @@ -101,9 +101,9 @@ ;; These two cases have to be first so that bottom (exceptions, etc.) can be allowed in cases ;; where multiple values are expected. ;; We can ignore the filters and objects in the actual value because they would never be about a value + [((or (tc-any-results:) (tc-results: _)) (tc-any-results:)) tr1] [((tc-result1: (? (lambda (t) (type-equal? t (Un))))) _) (fix-results expected)] - [((or (tc-any-results:) (tc-results: _)) (tc-any-results:)) tr1] [((tc-results: ts fs os) (tc-results: ts2 (NoFilter:) (NoObject:))) (unless (= (length ts) (length ts2)) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/check-below-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/check-below-tests.rkt index 93527cb6..3275de8f 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/check-below-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/check-below-tests.rkt @@ -95,6 +95,8 @@ (ret (list -Symbol) (list -top-filter) (list -empty-obj)) (ret (list Univ) (list -true-filter) (list (make-Path empty #'x)))) + (test-below (ret -Bottom) tc-any-results #:result (ret -Bottom)) + (test-below (ret Univ) tc-any-results #:result (ret Univ)) ;; Enable these once check-below is fixed ;; Currently does not fail