summaryrefslogtreecommitdiff
path: root/tests/structs/namespace-field-nested-initializer.vala
blob: 2ada47dd531fe295595efc270ac595218f3a36fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct Foo {
	public unowned string s;
	public int i;
}

struct Bar {
	public Foo foo;
}

Bar bar = {{"foo", 42}};

void main () {
	assert (bar.foo.s == "foo");
	assert (bar.foo.i == 42);
}