bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #4532] overriding rest argument with non-list value


From: nobody
Subject: [Bug-kawa] [bug #4532] overriding rest argument with non-list value
Date: Wed, 30 Jul 2003 08:33:08 -0400
User-agent: Mozilla/4.7 [en] (WinNT; I)

=================== BUG #4532: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4532&group_id=145

Submitted by: hoehle                  Project: Kawa                         
Submitted on: Wed 07/30/2003 at 14:33
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Status:  Open                         

Summary:  overriding rest argument with non-list value

Original Submission:  Here's a bug in Kawa, which I can observe both in 1.6.98 
and 1.7. I discovered it using SSAX/SXML code.

Compilation of SSAX/lib/look-for-str.scm yields
;s:/src/CVS/ssax/SSAX/lib/look-for-str.scm:40:4: warning - cannot convert 
literal (of type java.lang.Boolean) to gnu.lists.LList

A small test case extracted from the above
(define bar (lambda (str . max-no-char)
  (set! max-no-char (if (null? max-no-char) #f (car max-no-char)))
  (list str max-no-char)
))
;(bar "abc")
;(bar "abc" 1)

Attempting to invoke bar yields to either
Invalid parameter, was: java.lang.Boolean
Invalid parameter, was: gnu.math.IntNum
depending on the above call form.

It seems like the compiler tries to assert type information (kawa list type) 
for max-no-char, which is wrong here because the #!rest variable gets 
superseeded by a non-list value by the assignment.

;(bar "abc" '(1 2 3))
works -- assigned value is still a list

Regards,
        Jörg Höhle.
Kawa-1.7.jar using JDK (1.3.1?) on MS-Windows-2k
or JDK 1.4 on Suse-Linux 8.1



No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4532&group_id=145

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]