Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/test21062.d(16): Error: variable name expected after type `bool`, not `synchronized`
5 fail_compilation/test21062.d(16): `synchronized` is a keyword, perhaps append `_` to make it an identifier
6 fail_compilation/test21062.d(17): Error: variable name expected after type `ubyte*`, not `out`
7 fail_compilation/test21062.d(17): `out` is a keyword, perhaps append `_` to make it an identifier
8 fail_compilation/test21062.d(21): Error: variable name expected after type `uint`, not `in`
9 fail_compilation/test21062.d(21): `in` is a keyword, perhaps append `_` to make it an identifier
10 ---
11 */
12
13 // https://issues.dlang.org/show_bug.cgi?id=21062
14 // Confusing error when using a keyword as an identifier for a declaration
15
16 bool synchronized;
17 ubyte* out;
18
19 void main()
20 {
21 foreach(uint in; [])
22 {
23 }
24 }