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

 
 

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

Submitted by:  Jörg-Cyril Höhle <hoehle>
Submitted on:  Wed 30 Jul 2003 12:33:06 PM UTC  
 
Category: Code generationSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 29 May 2006 03:32:43 PM UTCdavidocCarbon-Copy-=>Added davidoc
Sat 01 Nov 2003 06:49:17 AM UTCbothnerCategoryNone=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1