This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project. See the Kawa home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

`object' and interfaces



Hi,

I am trying to create an object that implements an interface. The
documentation says that among the superclasses, only one is to be
extended and the rest must be interfaces. What am I doing wrong in the
following example?

#|kawa:1|# (object (<java.lang.Object> <java.awt.event.ItemListener>)
                   ((itemStateChanged <java.awt.event.ItemEvent>)
                    <void>
                    (display "listener called")))
Exception in thread "main" java.lang.Error: duplicate superclass
        at gnu.expr.ObjectExp.getCompiledClassType(Compiled Code)
        at gnu.expr.Compilation.allocClass(Compiled Code)
        at gnu.expr.Compilation.allocClass(Compiled Code)
        at gnu.expr.LambdaExp.allocChildClasses(Compiled Code)
        at gnu.expr.Compilation.addClass(Compiled Code)
        at gnu.expr.Compilation.<init>(Compiled Code)
        at gnu.expr.LambdaExp.eval(Compiled Code)
        at gnu.expr.ModuleExp.evalModule(Compiled Code)
        at kawa.Shell.run(Compiled Code)
        at kawa.Shell.run(Compiled Code)
        at kawa.repl.main(Compiled Code)

Thanks,
Aleks