expander: fix order of unbound-identifier compilants at phase > 0
Closes #2167
This commit is contained in:
parent
6bc8369af5
commit
80e353c143
|
@ -2277,6 +2277,22 @@
|
|||
(begin-for-syntax
|
||||
(local-expand #'(#%plain-module-begin (m #f)) 'module-begin '())))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; Check order of complaints for unbound identifiers
|
||||
|
||||
(define (check-complain-first m)
|
||||
(err/rt-test (eval m)
|
||||
(lambda (x)
|
||||
(regexp-match? #rx"complain-about-this-one" (exn-message x)))))
|
||||
|
||||
(check-complain-first '(module m racket/base
|
||||
(define (f a)
|
||||
(complain-about-this-one (not-about-this-one)))))
|
||||
(check-complain-first '(module m racket/base
|
||||
(require (for-syntax racket/base))
|
||||
(define-syntax (f a)
|
||||
(complain-about-this-one (not-about-this-one)))))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -1035,7 +1035,7 @@
|
|||
(define (check-defined-by-now need-eventually-defined self ctx requires+provides)
|
||||
;; If `need-eventually-defined` is not empty, report an error
|
||||
(for ([(phase l) (in-hash need-eventually-defined)])
|
||||
(for ([id (in-list l)])
|
||||
(for ([id (in-list (reverse l))])
|
||||
(define b (resolve+shift id phase))
|
||||
(define bound-here? (and b
|
||||
(module-binding? b)
|
||||
|
|
|
@ -75577,7 +75577,7 @@ static const char *startup_source =
|
|||
"(begin"
|
||||
"(let-values()"
|
||||
"(begin"
|
||||
"(let-values(((lst_447) l_89))"
|
||||
"(let-values(((lst_447)(reverse$1 l_89)))"
|
||||
"(begin"
|
||||
"(if(variable-reference-from-unsafe?"
|
||||
"(#%variable-reference))"
|
||||
|
|
Loading…
Reference in New Issue
Block a user