diff --git a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt index e021602e94..def41d3e0c 100644 --- a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -230,6 +230,8 @@ [tc-e (values) #:ret (ret null)] [tc-e (values 3 #f) #:ret (ret (list -PosByte (-val #f)) (list (-FS -top -bot) (-FS -bot -top)))] [tc-e (map #{values @ Symbol} '(a b c)) (-pair Sym (make-Listof Sym))] + [tc-e (andmap add1 (ann '() (Listof Number))) (t:Un (-val #t) N)] + [tc-e (ormap add1 (ann '() (Listof Number))) (t:Un (-val #f) N)] [tc-e (letrec: ([fact : (Number -> Number) (lambda: ([n : Number]) (if (zero? n) 1 (* n (fact (- n 1)))))]) (fact 20)) N] diff --git a/collects/typed-racket/base-env/base-env.rkt b/collects/typed-racket/base-env/base-env.rkt index 5cd1525e08..511c0f560a 100644 --- a/collects/typed-racket/base-env/base-env.rkt +++ b/collects/typed-racket/base-env/base-env.rkt @@ -252,11 +252,11 @@ [defined? (->* (list Univ) -Boolean : (-FS (-not-filter -Undefined 0 null) (-filter -Undefined 0 null)))] -[ormap (-polydots (a c b) (->... (list (->... (list a) (b b) c) (-lst a)) ((-lst b) b) c))] +[ormap (-polydots (a c b) (->... (list (->... (list a) (b b) c) (-lst a)) ((-lst b) b) (Un c (-val #f))))] [andmap (-polydots (a c d b) (cl->* ;; 1 means predicate on second argument (make-pred-ty (list (make-pred-ty (list a) c d) (-lst a)) c (-lst d) 1) - (->... (list (->... (list a) (b b) c) (-lst a)) ((-lst b) b) c)))] + (->... (list (->... (list a) (b b) c) (-lst a)) ((-lst b) b) (Un c (-val #t)))))] [box (-poly (a) (a . -> . (-box a)))] [box-immutable (-poly (a) (a . -> . (-box a)))]