diff --git a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt index 2baacdd1..bbd8ba62 100644 --- a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -171,6 +171,8 @@ (tc-e (- 1) -NegFixnum) (tc-e (- 1073741823) -NegFixnum) (tc-e (- -4) -PosFixnum) + (tc-e/t 1152921504606846975 -PosInt) + (tc-e/t -1152921504606846975 -NegInt) (tc-e (- 3253463567262345623) -NegInt) (tc-e (- -23524623547234734568) -PosInt) (tc-e (- 241.3) -NegFlonum) diff --git a/collects/typed-racket/types/numeric-tower.rkt b/collects/typed-racket/types/numeric-tower.rkt index 31234fc5..1a8404b6 100644 --- a/collects/typed-racket/types/numeric-tower.rkt +++ b/collects/typed-racket/types/numeric-tower.rkt @@ -103,6 +103,9 @@ #'-NegFixnum)) (define -NonPosFixnum (*Un -NegFixnum -Zero)) (define -Fixnum (*Un -NegFixnum -Zero -PosFixnum)) +;; This type, and others like it, should *not* be exported, or used for +;; anything but building unions. Especially, no literals should be given +;; these types. (define -PosIntNotFixnum (make-Base 'Positive-Integer-Not-Fixnum #'(and/c exact-integer? positive? (not/c fixnum?))