summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/ice14055.d
blob: 5e60e88cdf8286c99c8753d21ce3c8eaa2fb369e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
TEST_OUTPUT:
---
fail_compilation/ice14055.d(16): Error: uninitialized variable 'foo' cannot be returned from CTFE
---
*/

struct S
{
    static returnsFoo()
    {
        uint[1] foo = void;
        return foo;
    }

    static enum fooEnum = returnsFoo();
    static uint[1] fooArray = fooEnum[];
}