fix bug in keyword-argument calls

Closes PR 12104
This commit is contained in:
Matthew Flatt 2011-08-12 07:23:59 -06:00
parent cd1281fa65
commit ce4286c722
2 changed files with 8 additions and 1 deletions

View File

@ -1061,7 +1061,9 @@
#,@(if rest?
#`((list #,@(list-tail args (min (length args) (+ n-req n-opt)))))
null))
#,(quasisyntax/loc stx (#%app #,wrap-id . #,args))))))))
#,(if lifted?
orig
(quasisyntax/loc stx (#%app #,wrap-id . #,args)))))))))
orig))))
(datum->syntax stx (cons wrap-id #'(arg ...)) stx stx)))]
[_ wrap-id]))))

View File

@ -278,6 +278,11 @@
(set! f (lambda (#:y y) (box y)))
(test (box 8) (lambda () (f #:y 8))))
(let ()
(define (f #:x [x 1]) x)
(test 7 (lambda () (f #:x 7)))
(set! f #f))
;; ----------------------------------------
(report-errs)