1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/parseStc.d(11): Error: found `;` when expecting `)` 5 fail_compilation/parseStc.d(11): Error: found `)` when expecting `;` following statement 6 fail_compilation/parseStc.d(12): Error: redundant attribute `const` 7 --- 8 */ test1()9void test1() 10 { 11 if (x; 1) {} 12 if (const const auto x = 1) {} 13 } 14 15 /* 16 TEST_OUTPUT: 17 --- 18 fail_compilation/parseStc.d(25): Error: redundant attribute `const` 19 fail_compilation/parseStc.d(26): Error: redundant attribute `const` 20 fail_compilation/parseStc.d(27): Error: conflicting attribute `immutable` 21 --- 22 */ test2()23void test2() 24 { 25 const const x = 1; 26 foreach (const const x; [1,2,3]) {} 27 foreach (const immutable x; [1,2,3]) {} 28 } 29 30 /* 31 TEST_OUTPUT: 32 --- 33 fail_compilation/parseStc.d(37): Error: redundant attribute `const` 34 fail_compilation/parseStc.d(38): Error: redundant attribute `const` 35 --- 36 */ test3S337struct S3 { const const test3() {} } test4(const const int x)38void test4(const const int x) {} 39