summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/ice10922.d
blob: f3a7a57a689546d188ec1172b23f4c5fa6748f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
TEST_OUTPUT:
---
fail_compilation/ice10922.d(10): Error: function `ice10922.__lambda4(in uint n)` is not callable using argument types `()`
fail_compilation/ice10922.d(10):        too few arguments, expected `1`, got `0`
---
*/

auto fib = (in uint n) pure nothrow {
    enum self = __traits(parent, {});
    return (n < 2) ? n : self(n - 1) + self(n - 2);
};

void main()
{
    auto n = fib(39);
}