.
original commit: 4b2b98288993435ba91bb6b8f0b213904f4642c2
This commit is contained in:
parent
0351f97bc2
commit
9c8fc3ce86
|
@ -809,7 +809,7 @@
|
|||
. imports)))])
|
||||
(if global?
|
||||
(syntax (let-values ([(tagged-export ...) invoke-unit])
|
||||
(namespace-variable-binding 'tagged-export tagged-export)
|
||||
(namespace-set-variable-value! 'tagged-export tagged-export)
|
||||
...
|
||||
(void)))
|
||||
(syntax (define-values (tagged-export ...) invoke-unit)))))))])))])
|
||||
|
|
|
@ -590,4 +590,17 @@
|
|||
#f y)
|
||||
x))
|
||||
|
||||
(test 55 'namespace
|
||||
(parameterize ([current-namespace (make-namespace)])
|
||||
(namespace-variable-bind/invoke-unit
|
||||
(x)
|
||||
(unit
|
||||
(import)
|
||||
(export x)
|
||||
|
||||
(define-syntax (five stx) #'55)
|
||||
(define x five)))
|
||||
(eval 'x)))
|
||||
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -570,5 +570,24 @@
|
|||
(test #t struct-accessor-procedure? (go foo-bar (- make-foo)))
|
||||
(test #t struct-mutator-procedure? (go set-foo-bar! (- make-foo))))
|
||||
|
||||
;; Definitions and namespace:
|
||||
(test 12
|
||||
'def-val
|
||||
(let ()
|
||||
(define-values/invoke-unit/sig (foo)
|
||||
(unit/sig (foo)
|
||||
(import)
|
||||
(define foo 12)))
|
||||
foo))
|
||||
(test 120
|
||||
'namespace
|
||||
(parameterize ([current-namespace (make-namespace)])
|
||||
(namespace-variable-bind/invoke-unit/sig
|
||||
(foo)
|
||||
(unit/sig (foo)
|
||||
(import)
|
||||
(define foo 120)))
|
||||
(eval 'foo)))
|
||||
|
||||
(report-errs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user