fix `syntax-local-bind-syntaxes' argument checking

Closes PR 11808
This commit is contained in:
Matthew Flatt 2011-03-16 06:36:48 -06:00
parent 0efcf22ed4
commit 4b39efdee4
2 changed files with 10 additions and 1 deletions

View File

@ -540,4 +540,13 @@
;; ----------------------------------------
(let ()
(define-syntax (foo stx)
(define context (syntax-local-make-definition-context))
(with-handlers ([exn:fail:contract? (lambda (x) #''ok)])
(syntax-local-bind-syntaxes (list 'q) #'1 context)))
(test 'ok 'ok (foo)))
;; ----------------------------------------
(report-errs)

View File

@ -11559,7 +11559,7 @@ local_eval(int argc, Scheme_Object **argv)
names = argv[0];
for (l = names; SCHEME_PAIRP(l); l = SCHEME_CDR(l)) {
a = SCHEME_CAR(l);
if (!SCHEME_STX_SYMBOLP(a))
if (!SCHEME_STXP(a) || !SCHEME_STX_SYMBOLP(a))
break;
cnt++;
}