Hi there,

I have a question regarding interface inheritance in BeanShell.
This code:

interface X
{
}

interface Y extends X
{
}

(which is correct in Java) leads to the following exception when executed by the BeanShell interpreter:

Exception in thread "main" java.lang.ClassFormatError: Interfaces must have java.lang.Object as superclass in class file Y

        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at bsh.classpath.DiscreteFilesClassLoader.findClass(Unknown Source)
        at bsh.classpath.BshClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at bsh.classpath.ClassManagerImpl.classForName(Unknown Source)
        at bsh.classpath.ClassManagerImpl.defineClass(Unknown Source)
        at bsh.ClassGeneratorImpl.generateClassImpl(Unknown Source)
        at bsh.ClassGeneratorImpl.generateClass(Unknown Source)
        at bsh.BSHClassDeclaration.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at bsh.Interpreter.main(Unknown Source)

If I replace the "extends" by an "implements", e.g.

interface X
{
}

interface Y implements X
{
}

everything works fine. However, I would expect that "extends" would work like in Java.

Is this a (known?) bug, or is it a feature?

I'm using bsh-2.0b4.jar.

thanx,
Peter