This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
writing to parameter / type-switch
- From: Seth Alves <alves at hungry dot com>
- To: kawa at sourceware dot org
- Date: Sat, 29 Nov 2014 07:09:35 -0800
- Subject: writing to parameter / type-switch
- Authentication-results: sourceware.org; auth=none
I'm trying to run some code that does roughly this:
(define (foo . opt)
(set! opt (if (null? opt) #f (car opt)))
opt)
(display (foo 1))
(newline)
./kawa-type-switch.scm:7:13: warning - type java.lang.Boolean is
incompatible with required type list
./kawa-type-switch.scm:7:3: warning - cannot convert literal (of type
java.lang.Boolean) to Type list
Value '1' for variable 'opt' has wrong type (integer) (gnu.math.IntNum
cannot be cast to gnu.lists.LList)
at kawa$Mntype$Mnswitch.foo$V(kawa-type-switch.scm:7)
at kawa$Mntype$Mnswitch.applyN(kawa-type-switch.scm:6)
...
I can work around it, but is there a way to make kawa happy with this?
-seth