[armedbear-ticket] [armedbear] #205: JSS logic for resolving methods a little wonky (could use better diagnostics on why resolution has failed)
armedbear
armedbear-devel at common-lisp.net
Sun Apr 1 17:27:22 UTC 2012
#205: JSS logic for resolving methods a little wonky (could use better
diagnostics on why resolution has failed)
-----------------------------------+----------------------------------------
Reporter: mevenson | Owner: mevenson
Type: defect | Status: new
Priority: major | Milestone: 1.1.0
Component: libraries | Version: 1.0.1
Keywords: jss method-resolution |
-----------------------------------+----------------------------------------
[http://thread.gmane.org/gmane.lisp.armedbear.devel/2252 Jonathan P. Bona
is working with Alan Ruttenberg] to port LSW from JSS 1 to JSS 3:
{{{
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)
}}}
--
Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/205>
armedbear <http://common-lisp.net/project/armedbear>
armedbear
More information about the armedbear-ticket
mailing list