diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-08-13 15:39:12 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-08-13 15:50:37 +0200 |
commit | b9434165b67fa66aae58511c78508580bf7bd353 (patch) | |
tree | 30016031b536ab675839077d05ab1a4aee2d538e /test-suite/tests/compiler.test | |
parent | 98850fd727ad6b31ce2c4fe710935bbe9da9d966 (diff) | |
download | guile-b9434165b67fa66aae58511c78508580bf7bd353.tar.gz |
Allow redefinitions in compiled code as in `(define round round)'.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/ice-9/psyntax.scm (chi-top)[define-form]: If a same-named
imported variable exists, take its value instead of `#f'.
* test-suite/tests/compiler.test ("psyntax")["redefinition"]: New tests.
Diffstat (limited to 'test-suite/tests/compiler.test')
-rw-r--r-- | test-suite/tests/compiler.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test-suite/tests/compiler.test b/test-suite/tests/compiler.test index 1252c2881..fe9d7765f 100644 --- a/test-suite/tests/compiler.test +++ b/test-suite/tests/compiler.test @@ -25,3 +25,13 @@ (pass-if "compile to value" (equal? (compile 1) 1))) + + +(with-test-prefix "psyntax" + + (pass-if "redefinition" + ;; In this case the locally-bound `round' must have the same value as the + ;; imported `round'. See the same test in `syntax.test' for details. + (let ((o1 (compile '(define round round))) + (o2 (compile '(eq? round (@@ (guile) round))))) + o2))) |