D-Bus: Remove extra semicolon to avoid C warning
[vala-lang.git] / tests / methods / closures.vala
blobacee5de289e015adceb9effcfeeb4aab48ae4221
1 delegate int Func ();
3 int A (int k, Func x1, Func x2, Func x3, Func x4, Func x5) {
4 Func B = null;
5 B = () => {
6 k = k - 1;
7 return A (k, B, x1, x2, x3, x4);
8 };
9 return k <= 0 ? x4 () + x5 () : B ();
12 void main () {
13 int result = A (10, () => 1, () => -1, () => -1, () => 1, () => 0);
14 assert (result == -67);