[Vala] Superinterface inheritance



Hello

I've got a little problem with interface inheritance (please see example
below). 
I have an interface (InterfaceName) that inherits from another interface
(SuperInterfaceName). 
If I want a class (TestKlass) to implement the interface, the vala
compiler says:

interfacetest.vala:9.1-9.39: error: TestKlass: some prerequisites
(`SuperInterfaceName') are not met
class TestKlass : Object, InterfaceName {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)

It only works if the TestKlass implements both interfaces. Why is this
necessary to explicitly implement each single interface?   


Example Code:
interface SuperInterfaceName : Object {
        public abstract void abc ();
}

interface InterfaceName : SuperInterfaceName {
        public abstract void xyz ();
}

class TestKlass : Object, InterfaceName {
        
        public void abc () {
        }
        
        public void xyz () {
        }
}

public int main() {
        var k = new TestKlass();
        return 0;
}




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