If a contracted import doesn't have a pair value (because we haven't run
the corresponding unit body yet), then result in a useful error instead of leaking internal implementation details. svn: r17541 original commit: e2f50af66c56b3cae1faed41d4f91f601dec84eb
This commit is contained in:
parent
1aeb722e27
commit
966b57ac62
|
@ -468,9 +468,12 @@
|
|||
(with-syntax ([ctc-stx (syntax-property ctc 'inferred-name var)])
|
||||
(quasisyntax/loc (error-syntax)
|
||||
(quote-syntax (let ([v/c (#,loc)])
|
||||
(contract ctc-stx (car v/c) (cdr v/c)
|
||||
(current-contract-region)
|
||||
#,(id->contract-src-info var))))))
|
||||
(if (pair? v/c)
|
||||
(contract ctc-stx (car v/c) (cdr v/c)
|
||||
(current-contract-region)
|
||||
#,(id->contract-src-info var))
|
||||
(error 'unit "contracted import ~a used before definition"
|
||||
(quote #,(syntax-object->datum var))))))))
|
||||
(quasisyntax/loc (error-syntax)
|
||||
(quote-syntax (#,loc)))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user