Skip to content

Commit

Permalink
fix random types (#1301)
Browse files Browse the repository at this point in the history
  • Loading branch information
gus-massa committed Feb 7, 2023
1 parent 595ecbe commit 246173a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion typed-racket-lib/typed-racket/base-env/base-env.rkt
Expand Up @@ -92,7 +92,7 @@

;; Section 4.3.2.7 (Random Numbers)
[random
(cl->* (->opt -Int -Int [-Pseudo-Random-Generator] -NonNegFixnum)
(cl->* (->opt -Int -Int [-Pseudo-Random-Generator] -Int)
(->opt -Int [-Pseudo-Random-Generator] -NonNegFixnum)
(->opt [-Pseudo-Random-Generator] -Flonum))]

Expand Down
4 changes: 3 additions & 1 deletion typed-racket-test/unit-tests/typecheck-tests.rkt
Expand Up @@ -2182,7 +2182,9 @@
(pseudo-random-generator->vector pg))
(-vec* -PosInt -PosInt -PosInt -PosInt -PosInt -PosInt))
(tc-e (random 1 5 (make-pseudo-random-generator))
-NonNegFixnum)
-Integer)
(tc-e (random -1 -5 (make-pseudo-random-generator))
-Integer)

;Structure Type Properties
(tc-e (make-struct-type-property 'prop)
Expand Down

0 comments on commit 246173a

Please sign in to comment.