BUG: overrwriten methods with args do not override

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

BUG: overrwriten methods with args do not override

David Lee
Using bsh-2.0b4.jar
 
This case works
 
bsh % foo() { print("hi");}
bsh % foo() { print("bye"); }
bsh % foo();
bye
 
 
This case fails

bsh % foo( elem ) { print("a");}
bsh % foo( elem ) { print("b"); }
bsh % foo(1);
a                ----> SHOULD BE  "b"

 
 
Any ideas ? Am I doing something wrong here ?
Thanks !
 
 
-----------------------------------------------------------
David A. Lee
[hidden email] 
http://www.calldei.com

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: BUG: overrwriten methods with args do not override

Felix Plesoianu
--- David Lee <[hidden email]> wrote:

> Using bsh-2.0b4.jar

> This case fails
>
> bsh % foo( elem ) { print("a");}
> bsh % foo( elem ) { print("b"); }
> bsh % foo(1);
> a                ----> SHOULD BE  "b"

Funny... it works just fine in 2.0b2

Felix


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: BUG: overrwriten methods with args do notoverride

David Lee
Interestingly, typed arguemnts overload great.


bsh % foo(String c) { print("c"); }
bsh % foo("a");
c
bsh % foo(String d) {print("d"); }
bsh % foo("b");
d

Its only the untyped args that fail to overload.
(note, also checked renaming the arg. Does nothing).

bsh % foo(a){ print ("a"); }
bsh % foo(b){ print ("b"); }
bsh % foo(1);
a



> --- David Lee <[hidden email]> wrote:
>
>> Using bsh-2.0b4.jar
>
>> This case fails
>>
>> bsh % foo( elem ) { print("a");}
>> bsh % foo( elem ) { print("b"); }
>> bsh % foo(1);
>> a                ----> SHOULD BE  "b"
>
> Funny... it works just fine in 2.0b2
>
> Felix
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Beanshell-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/beanshell-users
>


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: BUG: overrwriten methods with args do notoverride

Jesse Pavel
I hit this problem myself, and searching through the archives yielded
a mini discussion of this issue. Basically, 2.0b4 (or b3?) introduced
this bug, and you'd have to go back to b2, or, as you saw, use typed
arguments.

~Jesse

On 7/5/06, David Lee <[hidden email]> wrote:

> Interestingly, typed arguemnts overload great.
>
>
> bsh % foo(String c) { print("c"); }
> bsh % foo("a");
> c
> bsh % foo(String d) {print("d"); }
> bsh % foo("b");
> d
>
> Its only the untyped args that fail to overload.
> (note, also checked renaming the arg. Does nothing).
>
> bsh % foo(a){ print ("a"); }
> bsh % foo(b){ print ("b"); }
> bsh % foo(1);
> a
>
>
>
> > --- David Lee <[hidden email]> wrote:
> >
> >> Using bsh-2.0b4.jar
> >
> >> This case fails
> >>
> >> bsh % foo( elem ) { print("a");}
> >> bsh % foo( elem ) { print("b"); }
> >> bsh % foo(1);
> >> a                ----> SHOULD BE  "b"
> >
> > Funny... it works just fine in 2.0b2
> >
> > Felix
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Beanshell-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/beanshell-users
> >
>
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Beanshell-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/beanshell-users
>

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: BUG: overrwriten methods with args do notoverride

David Lee
Is this considered a feature or a bug ?
I'm worried if I go to b2 (I tried it, works great!) then forget about this
and upgrade later ...
will I be breaking things ? Or would I expect that b(N>4) will have this
fixed ?






>I hit this problem myself, and searching through the archives yielded
> a mini discussion of this issue. Basically, 2.0b4 (or b3?) introduced
> this bug, and you'd have to go back to b2, or, as you saw, use typed
> arguments.
>
> ~Jesse
>
> On 7/5/06, David Lee <[hidden email]> wrote:
>> Interestingly, typed arguemnts overload great.
>>
>>
>> bsh % foo(String c) { print("c"); }
>> bsh % foo("a");
>> c
>> bsh % foo(String d) {print("d"); }
>> bsh % foo("b");
>> d
>>
>> Its only the untyped args that fail to overload.
>> (note, also checked renaming the arg. Does nothing).
>>
>> bsh % foo(a){ print ("a"); }
>> bsh % foo(b){ print ("b"); }
>> bsh % foo(1);
>> a
>>
>>
>>
>> > --- David Lee <[hidden email]> wrote:
>> >
>> >> Using bsh-2.0b4.jar
>> >
>> >> This case fails
>> >>
>> >> bsh % foo( elem ) { print("a");}
>> >> bsh % foo( elem ) { print("b"); }
>> >> bsh % foo(1);
>> >> a                ----> SHOULD BE  "b"
>> >
>> > Funny... it works just fine in 2.0b2
>> >
>> > Felix
>> >
>> >
>> > __________________________________________________
>> > Do You Yahoo!?
>> > Tired of spam?  Yahoo! Mail has the best spam protection around
>> > http://mail.yahoo.com
>> >
>> > Using Tomcat but need to do more? Need to support web services,
>> > security?
>> > Get stuff done quickly with pre-integrated technology to make your job
>> > easier
>> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> > Geronimo
>> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> > _______________________________________________
>> > Beanshell-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/beanshell-users
>> >
>>
>>
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Beanshell-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/beanshell-users
>>
>


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: BUG: overrwriten methods with args do notoverride

Jesse Pavel
I think it's considered a bug.
But I'm not sure when it's slated to be fixed.

~Jesse

On 7/5/06, David Lee <[hidden email]> wrote:

> Is this considered a feature or a bug ?
> I'm worried if I go to b2 (I tried it, works great!) then forget about this
> and upgrade later ...
> will I be breaking things ? Or would I expect that b(N>4) will have this
> fixed ?
>
>
>
>
>
>
> >I hit this problem myself, and searching through the archives yielded
> > a mini discussion of this issue. Basically, 2.0b4 (or b3?) introduced
> > this bug, and you'd have to go back to b2, or, as you saw, use typed
> > arguments.
> >
> > ~Jesse
> >
> > On 7/5/06, David Lee <[hidden email]> wrote:
> >> Interestingly, typed arguemnts overload great.
> >>
> >>
> >> bsh % foo(String c) { print("c"); }
> >> bsh % foo("a");
> >> c
> >> bsh % foo(String d) {print("d"); }
> >> bsh % foo("b");
> >> d
> >>
> >> Its only the untyped args that fail to overload.
> >> (note, also checked renaming the arg. Does nothing).
> >>
> >> bsh % foo(a){ print ("a"); }
> >> bsh % foo(b){ print ("b"); }
> >> bsh % foo(1);
> >> a
> >>
> >>
> >>
> >> > --- David Lee <[hidden email]> wrote:
> >> >
> >> >> Using bsh-2.0b4.jar
> >> >
> >> >> This case fails
> >> >>
> >> >> bsh % foo( elem ) { print("a");}
> >> >> bsh % foo( elem ) { print("b"); }
> >> >> bsh % foo(1);
> >> >> a                ----> SHOULD BE  "b"
> >> >
> >> > Funny... it works just fine in 2.0b2
> >> >
> >> > Felix
> >> >
> >> >
> >> > __________________________________________________
> >> > Do You Yahoo!?
> >> > Tired of spam?  Yahoo! Mail has the best spam protection around
> >> > http://mail.yahoo.com
> >> >
> >> > Using Tomcat but need to do more? Need to support web services,
> >> > security?
> >> > Get stuff done quickly with pre-integrated technology to make your job
> >> > easier
> >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> > Geronimo
> >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> > _______________________________________________
> >> > Beanshell-users mailing list
> >> > [hidden email]
> >> > https://lists.sourceforge.net/lists/listinfo/beanshell-users
> >> >
> >>
> >>
> >> Using Tomcat but need to do more? Need to support web services, security?
> >> Get stuff done quickly with pre-integrated technology to make your job
> >> easier
> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> Geronimo
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> _______________________________________________
> >> Beanshell-users mailing list
> >> [hidden email]
> >> https://lists.sourceforge.net/lists/listinfo/beanshell-users
> >>
> >
>
>

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users