Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail111.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail111.d(12): Error: cannot have array of `int(int)`
5 ---
6 */
7
8 // https://issues.dlang.org/show_bug.cgi?id=289
9 // Compiler allows (and crashes on) dynamic arrays of typedefs of "immediate"-function types
10 alias int ft(int);
11
12 ft[] x; // is allowed
13
14 void test()
15 {
16 x.length = 2; // crashes DMD
17 }