Skip to content

Commit 323d2ba

Browse files
Fix 1 occurrence of always-throwing-if-to-when
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
1 parent 56c5100 commit 323d2ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

typed-racket-lib/typed-racket/utils/tc-utils.rkt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ don't depend on any other portion of the system
105105
[else stx]))))
106106

107107
(define (raise-typecheck-error msg stxs)
108-
(if (null? (cdr stxs))
109-
(raise-syntax-error (string->symbol "Type Checker") msg (car stxs))
110-
(raise-syntax-error (string->symbol "Type Checker") msg #f #f stxs)))
108+
(when (null? (cdr stxs))
109+
(raise-syntax-error (string->symbol "Type Checker") msg (car stxs)))
110+
(raise-syntax-error (string->symbol "Type Checker") msg #f #f stxs))
111111

112112
(define delayed-errors null)
113113

0 commit comments

Comments
 (0)