summaryrefslogtreecommitdiff
path: root/tests/structs/bug606202.vala
blob: f26fc721c02e651002a3edd7359fea1c3c2fdc4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct Foo {
	string s;

	public Foo (string s) {
		this.s = s;
	}
}

class Bar {
	public Foo? foo { get; set; }
}

void main () {
	var bar = new Bar ();
	var foo = Foo ("hello");
	bar.foo = foo;
	assert (bar.foo.s == "hello");
}