24 lines
582 B
Vala
24 lines
582 B
Vala
|
interface IfaceA : Object {
|
||
|
public abstract void method_a ();
|
||
|
}
|
||
|
|
||
|
interface IfaceB : Object, IfaceA {
|
||
|
public abstract void method_b ();
|
||
|
}
|
||
|
|
||
|
class Demo : Object, IfaceA, IfaceB {
|
||
|
public void method_a () { stdout.printf ("a called\n"); }
|
||
|
public void method_b () { stdout.printf ("b called\n"); }
|
||
|
public void method_c () { stdout.printf ("c called\n"); }
|
||
|
|
||
|
static int main ()
|
||
|
{
|
||
|
stdout.printf ("Hello world!\n");
|
||
|
var demo = new Demo ();
|
||
|
demo.method_a ();
|
||
|
demo.method_b ();
|
||
|
demo.method_c ();
|
||
|
return 0;
|
||
|
}
|
||
|
}
|