summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/diag12280.d
blob: 8fba6151bbedc096376ea5b8764590b08bc7a2f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
TEST_OUTPUT:
---
fail_compilation/diag12280.d(15): Error: undefined identifier `nonexistent`
fail_compilation/diag12280.d(13): Error: template instance `diag12280.f!10` error instantiating
fail_compilation/diag12280.d(18):        11 recursive instantiations from here: `f!0`
---
*/

void f(int i)()
{
    static if (i < 10)
        f!(i + 1);
    else
        nonexistent();
}

alias f0 = f!0;