1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Fix primitive-eval to return #<unspecified> for definitions

* module/ice-9/eval.scm (primitive-eval): Return #<unspecified> for
  definitions.  Previously the variable object was returned.

* test-suite/tests/eval.test (evaluator): Add test.

* NEWS: Add news entry.
This commit is contained in:
Mark H Weaver 2012-01-29 17:43:13 -05:00
parent 2f3e436411
commit adb8054c6d
3 changed files with 7 additions and 1 deletions

1
NEWS
View file

@ -180,6 +180,7 @@ Search the manual for these identifiers and modules, for more.
** Fix erroneous check in `set-procedure-properties!'.
** Fix generalized-vector-{ref,set!} for slices.
** Fix error messages involving definition forms.
** Fix primitive-eval to return #<unspecified> for definitions.
** HTTP: Extend handling of "Cache-Control" header.
** HTTP: Fix qstring writing of cache-extension values
** HTTP: Fix validators for various list-style headers.

View file

@ -428,7 +428,8 @@
(let ((x (eval x env)))
(if (and (procedure? x) (not (procedure-property x 'name)))
(set-procedure-property! x 'name name))
(define! name x)))
(define! name x)
(if #f #f)))
(('toplevel-set! (var-or-sym . x))
(variable-set!

View file

@ -75,6 +75,10 @@
(with-test-prefix "evaluator"
(pass-if "definitions return #<unspecified>"
(eq? (primitive-eval '(define test-var 'foo))
(if #f #f)))
(with-test-prefix "symbol lookup"
(with-test-prefix "top level"