[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: case-lambda* question
From: |
A. Arias |
Subject: |
Re: case-lambda* question |
Date: |
Wed, 14 Nov 2012 11:53:11 -0600 |
El mié, 14-11-2012 a las 11:20 +0100, Daniel Llorens escribió:
>
> Is this the test?
>
> (pass-if "case-lambda*"
> (null? (call-with-warnings
> (lambda ()
> (compile '(let ((f (case-lambda*
> ((x #:optional y) 1)
> ((x #:key y) 2)
> ((x y #:key z) 3))))
> (list (f 1)
> (f 1 2)
> (f #:y 2)
> (f 1 2 #:z 3)))
> #:opts %opts-w-arity
> #:to 'assembly)))))
>
Right.
> I also get an error here. Strangely, I can run make check without anything
> being reported. I get a warning
>
> UNRESOLVED: tree-il.test: warnings: unused-toplevel: used by macro
I can run now the tests, and this test in particular passes without
problem. But I don't know why.
>
> But I still don't understand how case-lambda* works or should work. The error
> is in the last call (f 1 2 #:z 3). If I remove it I get '(1 1 1), but how can
> (f #:y 2) match (x #:optional y) ??
>
> I'm running acc1d8… but this test has been in there since 2009 apparently.
>