cs: fix applicable struct implemented with applicable struct
This commit is contained in:
parent
edfdcb0b6d
commit
f1a177e880
|
@ -758,4 +758,21 @@
|
|||
|
||||
;; ----------------------------------------
|
||||
|
||||
(let ()
|
||||
(struct a ()
|
||||
#:property prop:procedure (lambda (a x)
|
||||
(list a x)))
|
||||
|
||||
(define the-a (a))
|
||||
|
||||
(struct b ()
|
||||
#:property prop:procedure the-a)
|
||||
|
||||
(define the-b (b))
|
||||
|
||||
(test (list the-a the-b) the-b)
|
||||
(test 0 procedure-arity the-b))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -132,15 +132,15 @@
|
|||
orig-f
|
||||
(and n-args (fx+ n-args 1))
|
||||
(lambda (v)
|
||||
(cond
|
||||
[(not v) (case-lambda)]
|
||||
[else
|
||||
(case-lambda
|
||||
[() (v f)]
|
||||
[(a) (v f a)]
|
||||
[(a b) (v f a b)]
|
||||
[(a b c) (v f a b c)]
|
||||
[args (chez:apply v f args)])]))
|
||||
(let ([proc (case-lambda
|
||||
[() (v f)]
|
||||
[(a) (v f a)]
|
||||
[(a b) (v f a b)]
|
||||
[(a b c) (v f a b c)]
|
||||
[args (chez:apply v f args)])])
|
||||
(if success-k
|
||||
(success-k proc)
|
||||
proc)))
|
||||
wrong-arity-wrapper)]))]))]
|
||||
[else (fail-k orig-f)]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user