This is the mail archive of the kawa@sources.redhat.com 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]

bug in set! syntax


Hi,

found a bug in set! sysntax handler. An attempt to use a syntax defined as follows causes
"first set! argument is not a variable name" error


(define-syntax test
 (syntax-rules ()
   ((test)
    (let((s 1))
      (set! s 1)
      ))))
(test)

Here is a patch that cures this very example, but I'm afraid, there are dosens of similar String/Symbol bugs in kawa code.

Index: kawa/standard/set_b.java
===================================================================
RCS file: /cvs/kawa/kawa/kawa/standard/set_b.java,v
retrieving revision 1.22
diff -r1.22 set_b.java
51c51
<     if (! (match[0] instanceof String))
---
>     if (!(match[0] instanceof String) && ! (match[0] instanceof Symbol))
53c53,54
<     String sym = (String) match[0];
---
>
>     String sym = match[0].toString();


Regards,


Vladimir


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