This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
bug in set! syntax
- From: Vladimir Tsichevski <wowa at jet dot msk dot su>
- To: Kawa List <kawa at sources dot redhat dot com>
- Date: Tue, 01 Apr 2003 14:43:29 +0400
- Subject: 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