Restrict contains-if check to "called-once" expansion

This commit is contained in:
Justin Ethier 2019-01-10 13:36:05 -05:00
parent 84d9d114dc
commit 8648e66ca6

View file

@ -1461,7 +1461,8 @@
;; case we do not want to beta-expand as a contraction ;; case we do not want to beta-expand as a contraction
;; because duplicate instances of the same code may be ;; because duplicate instances of the same code may be
;; introduced, causing problems downstream. ;; introduced, causing problems downstream.
(not (contains-if? (ast:lambda-body fnc))) (and called-once?
(not (contains-if? (ast:lambda-body fnc))))
)) ))
))) )))
(else #f))) (else #f)))