summaryrefslogtreecommitdiff
path: root/tests/methods/parameter-fixed-array-initializer.vala
blob: 516f1f36b2d0831a413a90d9b51c3f4e7e403bab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
struct Bar {
	int i;
	double d;
}

void foo (int a[3]) {
	assert (a[2] == 4711);
}

void bar (Bar b[3]) {
	assert (b[2].i == 23);
	assert (b[2].d == 47.11);
}

void main () {
	foo ({ 23, 42, 4711 });

	Bar b = { 23, 47.11 };
	bar ({b, b, b});
}