We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
inverted-unless
1 parent 3f21958 commit f2601c5Copy full SHA for f2601c5
typed-racket-lib/typed-racket/rep/rep-switch.rkt
@@ -35,7 +35,7 @@
35
(~var clause (switch-clause #'(pre-args ...) #'arg #'(post-args ...))) ...
36
[(~datum else:) . default])
37
(define name-symbols (map syntax->datum (syntax->list #'(clause.name ...))))
38
- (unless (not (null? name-symbols))
+ (when (null? name-symbols)
39
(raise-syntax-error 'define-switch "switch cannot be null" stx))
40
(define sorted-name-symbols (sort name-symbols symbol<?))
41
(unless (eq? (first name-symbols) (first sorted-name-symbols))
0 commit comments