ignore multiple-value return from interleaved init expressions in top-level-program

original commit: f5fd9d144b68af26244855c7c2f34be97298deea
This commit is contained in:
Oscar Waddell 2019-03-18 15:00:57 -04:00
parent bb67d6ff01
commit b8d6d649bc
3 changed files with 17 additions and 1 deletions

3
LOG
View File

@ -1251,3 +1251,6 @@
embed git revision in exported source archives
bintar/Makefile Mf-install.in wininstall/*nt.wxs
s/Mf-base s/.gitattributes s/update-revision
- ignore multiple-value return from interleaved init expressions in
top-level-program
syntax.ss, 8.ms

View File

@ -10715,6 +10715,18 @@
(remprop 'tlp-spam 'spam)
(remprop 'tlp-spam 'tlp)
#t))
; make sure we ignore return value(s) of interleaved init expressions
(equal?
(with-output-to-string
(lambda ()
; prevent cp0 from fixing the problem
(parameterize ([run-cp0 (lambda (f x) x)])
(eval '(top-level-program (import (scheme))
(define (f) (printf "hello\n") (values 1 2 3))
(f)
(define x 'world)
(pretty-print x))))))
"hello\nworld\n")
)
(mat library-meta

View File

@ -2830,7 +2830,8 @@
[interleaved-init (frob)
(process-bindings mb* r
(cons (build-lexical-var no-source 't) dv*)
(cons frob de*))]
(cons (make-frob #`(begin #,(frob-e frob) (void)) (frob-meta? frob))
de*))]
[else (process-bindings mb* r dv* de*)]))))))))
(define chi-top-module