bsh handles subclassing and static methods incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bsh (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: bsh
As noted at http://
class A
{
public static String foo()
{
return "A";
}
}
class B extends A
{
public static String foo()
{
return "B";
}
}
public class StaticInherit
{
public static void main(String[] a)
{
System.
System.
System.
}
}
If this file is compiled with javac and run with java, it will output A, B, B. However, if entered into Hardy bsh (and run with StaticInherit.
This bug has been fixed in beanshell2 (http://