Skip to content

Commit f2601c5

Browse files
Fix 1 occurrence of inverted-unless
This negated `unless` expression can be replaced by a `when` expression.
1 parent 3f21958 commit f2601c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typed-racket-lib/typed-racket/rep/rep-switch.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
(~var clause (switch-clause #'(pre-args ...) #'arg #'(post-args ...))) ...
3636
[(~datum else:) . default])
3737
(define name-symbols (map syntax->datum (syntax->list #'(clause.name ...))))
38-
(unless (not (null? name-symbols))
38+
(when (null? name-symbols)
3939
(raise-syntax-error 'define-switch "switch cannot be null" stx))
4040
(define sorted-name-symbols (sort name-symbols symbol<?))
4141
(unless (eq? (first name-symbols) (first sorted-name-symbols))

0 commit comments

Comments
 (0)