Skip to content

Commit 246173a

Browse files
authored
fix random types (#1301)
1 parent 595ecbe commit 246173a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

typed-racket-lib/typed-racket/base-env/base-env.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
;; Section 4.3.2.7 (Random Numbers)
9494
[random
95-
(cl->* (->opt -Int -Int [-Pseudo-Random-Generator] -NonNegFixnum)
95+
(cl->* (->opt -Int -Int [-Pseudo-Random-Generator] -Int)
9696
(->opt -Int [-Pseudo-Random-Generator] -NonNegFixnum)
9797
(->opt [-Pseudo-Random-Generator] -Flonum))]
9898

typed-racket-test/unit-tests/typecheck-tests.rkt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,9 @@
21822182
(pseudo-random-generator->vector pg))
21832183
(-vec* -PosInt -PosInt -PosInt -PosInt -PosInt -PosInt))
21842184
(tc-e (random 1 5 (make-pseudo-random-generator))
2185-
-NonNegFixnum)
2185+
-Integer)
2186+
(tc-e (random -1 -5 (make-pseudo-random-generator))
2187+
-Integer)
21862188

21872189
;Structure Type Properties
21882190
(tc-e (make-struct-type-property 'prop)

0 commit comments

Comments
 (0)