From 0f5ba032bf9108de6e0e0bd48bc69971f6e932f8 Mon Sep 17 00:00:00 2001 From: Bogdan Popa Date: Sat, 7 Nov 2020 15:53:21 +0200 Subject: [PATCH] match: ensure entire `body' is traversed when eliminating unused temps --- racket/collects/racket/match/compiler.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/racket/collects/racket/match/compiler.rkt b/racket/collects/racket/match/compiler.rkt index 62756d1c64..f63e307ab7 100644 --- a/racket/collects/racket/match/compiler.rkt +++ b/racket/collects/racket/match/compiler.rkt @@ -149,8 +149,9 @@ (for/first ([tmp (in-list (hash-keys todo))] #:when (free-identifier=? tmp stx)) (hash-remove! todo tmp) (hash-set! seen tmp #t))] - [(list? (syntax-e stx)) - (for-each loop (syntax-e stx))])) + [(syntax->list stx) + => (lambda (stxs) + (for-each loop stxs))])) (for/lists (tmps accs) ([tmp (in-list (syntax-e tmps))] [acc (in-list (syntax-e accs))]