d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail22151.d
blobc6c3b1b742b640bfb1a7298d1b088952a83ff54f
1 // https://issues.dlang.org/show_bug.cgi?id=22151
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/fail22151.d(14): Error: function `test` is not an lvalue and cannot be modified
6 fail_compilation/fail22151.d(15): Error: function `test2` is not an lvalue and cannot be modified
7 fail_compilation/fail22151.d(18): Error: function pointed to by `fp` is not an lvalue and cannot be modified
8 fail_compilation/fail22151.d(21): Error: function pointed to by `ff` is not an lvalue and cannot be modified
9 ---
12 void test()
14 *&test = *&test;
15 *&test2 = *&test;
17 void function() fp;
18 *fp = *fp;
20 auto ff = &test2;
21 *ff = *&test2;
24 void test2();