Skip to content

Commit 97c1968

Browse files
Fix 1 occurrence of zero-comparison-to-negative?
This expression is equivalent to calling the `negative?` predicate.
1 parent 8e83b1a commit 97c1968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
(cond
5858
[(not (and (integer? i-val) (exact? i-val)))
5959
(tc-error/expr #:stx expr "expected exact integer for ~a index, but got ~a" name i-val)]
60-
[(< i-val 0)
60+
[(negative? i-val)
6161
(tc-error/expr #:stx expr "index ~a too small for ~a ~a" i-val name type)]
6262
[(not (< i-val i-bound))
6363
(tc-error/expr #:stx expr "index ~a too large for ~a ~a" i-val name type)]))

0 commit comments

Comments
 (0)