diff --git a/collects/scheme/private/for.ss b/collects/scheme/private/for.ss index c658501b74..3035f90758 100644 --- a/collects/scheme/private/for.ss +++ b/collects/scheme/private/for.ss @@ -1004,16 +1004,15 @@ (lambda (stx) (let loop ([stx stx]) (syntax-case stx () - [[(id) (_ start)] - (and (integer? (syntax-e #'start)) - (exact? (syntax-e #'start)) - ((syntax-e #'start) . >= . 0)) + [[(id) (_ start-expr)] #`[(id) (:do-in ;; outer bindings: - () + ([(start) start-expr]) ;; outer check: - (void) + (unless (exact-nonnegative-integer? start) + ;; let `in-naturals' report the error: + (in-naturals start)) ;; loop bindings: ([pos start]) ;; pos check