summaryrefslogtreecommitdiff
path: root/tests/objects/property-real-struct-assignment.vala
blob: 26790763cfee512dca5e892118fe8766e39b3f8a (plain)
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
struct Foo {
	string s;
}

Foo? get_foo () {
	return { "foo" };
}

class Manam : Object {
	public virtual Foo faz { get; set; }
}

class Bar : Manam {
	public Foo foo { get; set; }

	public Bar () {
		{
			this.foo = get_foo ();
		}
		{
			base.faz = get_foo ();
		}
		{
			this.foo = (!) get_foo ();
		}
		{
			base.faz = (!) get_foo ();
		}
		{
			this.foo = (Foo) get_foo ();
		}
		{
			base.faz = (Foo) get_foo ();
		}
		{
			var f = get_foo ();
			this.foo = (!) f;
		}
		{
			var f = get_foo ();
			base.faz = (!) f;
		}
		{
			var f = get_foo ();
			this.foo = (Foo) f;
		}
		{
			var f = get_foo ();
			base.faz = (Foo) f;
		}
	}
}

void main() {
	var bar = new Bar ();
}