blob: 2af7f4b86a245ddbcd600ebb97af300987699a20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
interface IFoo : Object {
public abstract async int foo ();
}
class Bar : Object, IFoo {
public override async int foo () {
return 42;
}
}
MainLoop loop;
void main () {
loop = new MainLoop ();
IFoo bar = new Bar ();
bar.foo.begin ((o,r) => {
assert (((IFoo) o).foo.end (r) == 42);
loop.quit ();
});
loop.run ();
}
|