File: bug614294.vala

package info (click to toggle)
vala 0.56.18-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 57,468 kB
  • sloc: ansic: 581,293; sh: 5,334; makefile: 3,946; xml: 3,161; yacc: 1,219; lex: 374; javascript: 23
file content (59 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
interface IFoo : Object {
	public abstract async void foo_async () throws Error;
	public abstract void foo () throws Error;
}

class Bar : Object, IFoo {
	public virtual async void foo_async () {
	}
	public virtual void foo () {
	}
}

class SubBar : Bar {
	public override async void foo_async () {
	}
	public override void foo () {
	}
}

abstract class AFoo : Object {
	public abstract async void foo_async () throws Error;
	public abstract void foo () throws Error;
}

class Baz : AFoo {
	public override async void foo_async () {
	}
	public override void foo () {
	}
}

class SubBaz : Baz {
	public override async void foo_async () {
	}
	public override void foo () {
	}
}

async void run () {
	var bar = new Bar ();
	bar.foo ();
	yield bar.foo_async ();

	var subbar = new SubBar ();
	subbar.foo ();
	yield subbar.foo_async ();

	var baz = new Baz ();
	baz.foo ();
	yield bar.foo_async ();

	var subbaz = new SubBaz ();
	subbaz.foo ();
	yield subbaz.foo_async ();
}

void main () {
	run.begin ();
}