File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
typed-racket-lib/typed-racket/typecheck Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 213213 opt:opt-lambda^)
214214 ;; it's only an interesting opt-lambda expansion if the number
215215 ;; of optional arguments is greater than zero
216- #:when (> (cadr (attribute opt.value)) 0 )
216+ #:when (positive? (cadr (attribute opt.value)))
217217 #:do [(register/method #'meth-name )]
218218 #:with props-core
219219 (let* ([prop-val (attribute opt.value)]
13301330 (match-define (super-init-stxs provided-pos-args provided-inits)
13311331 super-new )
13321332 (define pos-init-diff (- (length provided-pos-args) (length super-inits)))
1333- (cond [(and (> pos-init-diff 0 ) (not init-rest ))
1333+ (cond [(and (positive? pos-init-diff) (not init-rest ))
13341334 ;; errror case that's caught above, do nothing
13351335 (void)]
1336- [(> pos-init-diff 0 )
1336+ [(positive? pos-init-diff)
13371337 (define-values (pos-args for-init-rest)
13381338 (split-at provided-pos-args (length super-inits)))
13391339 (for ([pos-arg pos-args]
Original file line number Diff line number Diff line change 336336 [_ #f ]))
337337
338338 (cond
339- [(and (> (free-id-table-count aux-table) 0 ) (not rest-id))
339+ [(and (positive? (free-id-table-count aux-table)) (not rest-id))
340340 (tc/opt-lambda-clause arg-list body aux-table)]
341341 [else
342342 (define arg-types (get-types arg-list #:default (lambda () #f )))
You can’t perform that action at this time.
0 commit comments