Avoid doing the 2nd pass twice at the top-level

Thanks to Eric for pointing this out.

original commit: d7f29d3636e49fa2987e71f9fe4a3b1ace05dd09
This commit is contained in:
Asumu Takikawa 2013-05-16 17:34:09 -04:00
parent d458037de6
commit ddaf1b7825

View File

@ -415,8 +415,10 @@
;; Don't open up `begin`s that are supposed to be ignored
#:when (not (or (syntax-property form 'typechecker:ignore)
(syntax-property form 'typechecker:ignore-some)))
(for-each tc-toplevel-form (syntax->list #'(e ...)))
(begin0 (values #f (tc-toplevel/pass2 form))
(define-values (_ pass2-results)
(for/lists (_1 _2) ([form (syntax->list #'(e ...))])
(tc-toplevel-form form)))
(begin0 (values #f (last pass2-results))
(report-all-errors))]
[_
(when ((internal-syntax-pred define-type-alias-internal) form)