.
original commit: a30ada49b10c90f63405b1b5cd1811158c89f82b
This commit is contained in:
parent
6fab6f9ddd
commit
2a6cdd1fae
|
@ -66,9 +66,17 @@
|
||||||
(error-test '(compound-unit (import) (link (A (0 (B))) (B (0))) (export)) exn:unit?)
|
(error-test '(compound-unit (import) (link (A (0 (B))) (B (0))) (export)) exn:unit?)
|
||||||
(error-test '(compound-unit (import) (link (A (0)) (B (0))) (export (A x) (B))) exn:unit?)
|
(error-test '(compound-unit (import) (link (A (0)) (B (0))) (export (A x) (B))) exn:unit?)
|
||||||
|
|
||||||
; Self-import:
|
; Self-import is now allowed
|
||||||
(syntax-test '(compound-unit (import) (link (A (0 (A)))) (export)))
|
; (syntax-test '(compound-unit (import) (link (A (0 (A)))) (export)))
|
||||||
(syntax-test '(compound-unit (import) (link (A (0 (A x)))) (export)))
|
; (syntax-test '(compound-unit (import) (link (A (0 (A x)))) (export)))
|
||||||
|
(test (list (letrec ([x x]) x) 5)
|
||||||
|
'self-import
|
||||||
|
(invoke-unit
|
||||||
|
(compound-unit
|
||||||
|
(import)
|
||||||
|
(link [U ((unit (import a) (export b) (define x a) (define b 5) (list x a))
|
||||||
|
(U b))])
|
||||||
|
(export))))
|
||||||
|
|
||||||
(unless (defined? 'test-global-var)
|
(unless (defined? 'test-global-var)
|
||||||
(define test-global-var 5)
|
(define test-global-var 5)
|
||||||
|
|
|
@ -120,8 +120,17 @@
|
||||||
(syntax-test '(compound-unit/sig (import (i : a)) (link (b@ : b (b@))) (export (var ((b@ 7) 5)))))
|
(syntax-test '(compound-unit/sig (import (i : a)) (link (b@ : b (b@))) (export (var ((b@ 7) 5)))))
|
||||||
(syntax-test '(compound-unit/sig (import (i : a)) (link (b@ : b (b@))) (export (var (b@ x . a)))))
|
(syntax-test '(compound-unit/sig (import (i : a)) (link (b@ : b (b@))) (export (var (b@ x . a)))))
|
||||||
|
|
||||||
(syntax-test '(compound-unit/sig (import) (link (A : () (0 A))) (export))) ; self-import
|
; Self-import is now allowed
|
||||||
(syntax-test '(compound-unit/sig (import) (link (A : (x) (0 A))) (export))) ; self-import
|
; (syntax-test '(compound-unit/sig (import) (link (A : () (0 A))) (export))) ; self-import
|
||||||
|
; (syntax-test '(compound-unit/sig (import) (link (A : (x) (0 A))) (export))) ; self-import
|
||||||
|
(test (list (letrec ([x x]) x) 5)
|
||||||
|
'self-import
|
||||||
|
(invoke-unit/sig
|
||||||
|
(compound-unit/sig
|
||||||
|
(import)
|
||||||
|
(link [U : (a) ((unit/sig (a) (import (a)) (rename (b a)) (define x a) (define b 5) (list x a))
|
||||||
|
U)])
|
||||||
|
(export))))
|
||||||
|
|
||||||
(test #t unit/sig? (unit/sig a (import)))
|
(test #t unit/sig? (unit/sig a (import)))
|
||||||
(test #t unit/sig? (unit/sig b (import) (define x 1) (define y 2)))
|
(test #t unit/sig? (unit/sig b (import) (define x 1) (define y 2)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user