[Vala] Chaining up to default implementations in Interface?



Dear List,

Is it possible to chain up to the default implementations in a overridden interface member function?

In other words, the following code doesn't compile:

public interface Iface {
  public void function() {
    message("do somethign");
  }
}

public class Class:Object, Iface {
  public void function() {
   message("class do something");
   base.function();
 }
}

The error is
  The name `function' does not exist in the context of `GLib.Object'

Is this a bug or an intended behavior? -- at least in GLib we have g_type_default_interface_peek which can obtain the default vtable of the interface.

Regards,

Yu



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