File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -772,6 +772,15 @@ no-change-test: "when with multiple forms in outer body should not be merged"
772772--------------------
773773
774774
775+ no-change-test: "single when with and containing 3 conditions should not be refactored "
776+ --------------------
777+ (define (f a b c)
778+ (when (and (a) (b)
779+ (c))
780+ (displayln "foo " )))
781+ --------------------
782+
783+
775784test: "ignored and expression refactorable to when expression "
776785--------------------
777786(define (f c1)
Original file line number Diff line number Diff line change 222222 "Nested `when` expressions can be merged into a single compound `when` expression. "
223223 when-expr:nested-when-expression
224224 #:when (or (>= (attribute when-expr.depth) 3 )
225- (>= (length (attribute when-expr.condition)) 3 )
225+ (and (>= (attribute when-expr.depth) 2 )
226+ (>= (length (attribute when-expr.condition)) 3 ))
226227 (and (equal? (attribute when-expr.depth) 2 )
227228 (andmap identifier? (attribute when-expr.condition))))
228229 (when (and when-expr.condition ... ) when-expr.body ... ))
You can’t perform that action at this time.
0 commit comments