bugKawa - Bugs: bug #4532, overriding rest argument with...

 
 

bug #4532: overriding rest argument with non-list value

Submitter:  Jörg-Cyril Höhle <hoehle>
Submitted:  Wed 30 Jul 2003 12:33:06 PM UTC
 
Category:  Code generation Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Mon 29 May 2006 03:30:53 PM UTC, comment #1: 

Hi,

This still seems to be a problem in Kawa 1.8.1 alpha. I noticed it when trying to get SLIB to work.

David

David O Callaghan <davidoc>
Wed 30 Jul 2003 12:33:06 PM UTC, 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

Jörg-Cyril Höhle <hoehle>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one

Digest:
   bug dependencies.

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

 

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-05-29 davidoc Carbon-Copy- Added davidoc
2003-11-01 bothner CategoryNone (Error - Not Found)

Back to the top

Powered by Savane 3.10