[armedbear-devel] JSS issues: bug in jss::with-constant-signature, jss::invoke-find-method?
Jonathan P. Bona
jonathanbona at gmail.com
Fri Mar 30 21:36:03 UTC 2012
I'm working with Alan Ruttenberg to port LSW from the old version of
JSS to the JSS that is now part of abcl-contrib.
We've run into the following bug when using with-constant-signature:
; these first two work fine:
(#"substring" "some string" 2 4) ; "me"
(#"substring" "some string" 2) ; "me string"
; and so does this
(with-constant-signature ((substring "substring")) (substring "some
string" 2 4)) ; "me"
; but this breaks:
(with-constant-signature ((substring "substring")) (substring "some string" 2))
; Wrong number of arguments for public java.lang.String
java.lang.String.substring(int,int): expected 2, got 1
; [Condition of type PROGRAM-ERROR]
A problem seems to be in jss::invoke-find-method, which is finding the
two argument version of java.lang.String.substring no matter how many
arguments its given:
(jss::invoke-find-method "substring" "this is a string" '(1)) ;
should return the java.lang.String.substring method with one int arg
; #<method public java.lang.String java.lang.String.substring(int,int)>
(jss::invoke-find-method "substring" "this is a string" '(1 2) )
; #<method public java.lang.String java.lang.String.substring(int,int)>
(jss::invoke-find-method "substring" "this is a string" '(1 2 3 4 5 6
7 8) ) ; should be an error
; #<method public java.lang.String java.lang.String.substring(int,int)>
- Jonathan Bona
More information about the armedbear-devel
mailing list