fix `chaperone-prompt-tag'

This commit is contained in:
Matthew Flatt 2012-10-24 13:04:35 -07:00
parent 7b149b7f5a
commit 1bf5fda869
2 changed files with 23 additions and 1 deletions

View File

@ -323,6 +323,28 @@
values
(lambda (s) (string-append s "x")))))
;; ----------------------------------------
;; check that cc proc doesn't break abort proc
(let ()
(define l null)
(define cpt
(chaperone-prompt-tag
(make-continuation-prompt-tag)
(λ (x) (set! l (cons "ho" l)) x)
(λ (x) (set! l (cons "hi" l)) x)
;; commented out intentionally, see below
(λ (x) x)))
(call-with-continuation-prompt
(λ ()
(abort-current-continuation cpt 5))
cpt
(λ (x) (+ 1 x)))
(test '("ho" "hi") values l))
;; ----------------------------------------
;; Check that when a continuation includes a continuation
;; application, that a captured requirement to apply a

View File

@ -5800,7 +5800,7 @@ Scheme_Object *do_chaperone_prompt_tag (const char *name, int is_impersonator, i
ppos = 5;
} else
ppos = 4;
redirects = scheme_make_pair(argv[1], redirects);
redirects = scheme_make_pair(argv[2], redirects);
} else {
ppos = 3;
redirects = argv[2];