This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

writing to parameter / type-switch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]