define-inline: fix call with multiple keyword arguments

This commit is contained in:
Matthew Flatt 2015-08-04 11:04:54 -06:00
parent 7b70a42361
commit d34416ea02
2 changed files with 9 additions and 1 deletions

View File

@ -4430,6 +4430,14 @@
(define-inline (odd? x) (if (zero? x) #f (even? (sub1 x)))) (define-inline (odd? x) (if (zero? x) #f (even? (sub1 x))))
(test/output (odd? 2) (test/output (odd? 2)
#f "") #f "")
;; multiple keyword arguments that have to be sorted:
(define-inline (sub #:a a #:b b)
(- a b))
(test/output (sub #:a 2 #:b 1)
1 "")
(test/output (sub #:b 1 #:a 2)
1 "")
) )

View File

@ -112,7 +112,7 @@
string<? string<?
#:key (lambda (kw) #:key (lambda (kw)
(keyword->string (keyword->string
(syntax-e kw))))]) (syntax-e (car kw)))))])
(keyword-apply (keyword-apply
function-aux function-aux
(map (lambda (x) (syntax-e (car x))) (map (lambda (x) (syntax-e (car x)))