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]

nested functions and #!optional


I've got a situation where it unexpectedly throws an exception which puzzled me.

(define (func)
  (define (nested-func #!optional arg)
    (set! arg "any string"))
  (nested-func))

(func)

doing the above throws this
java.lang.ClassCastException: java.lang.Boolean cannot be casted to
java.lang.String

while this is fine

(define (nested-func #!optional arg)
    (set! arg "bugged"))

(nested-func)


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