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: Sat, 01 Nov 2003 01:49:18 -0500
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030827

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

Changes by: Per Bothner <address@hidden>
Date: Sat 11/01/2003 at 06:49 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
            Category | None                      | Code generation




=================== BUG #4532: FULL BUG SNAPSHOT ===================


Submitted by: hoehle                  Project: Kawa                         
Submitted on: Wed 07/30/2003 at 12:33
Category:  Code generation            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]