MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail4375q.d
blobf57e746b6ed33e7a9215c4a196bf61f32d57c7cd
1 // REQUIRED_ARGS: -w
2 // https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail4375q.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375q.d(13)
7 fail_compilation/fail4375q.d(14): Error: `with` expression types must be enums or aggregates or pointers to them, not `int`
8 ---
9 */
11 void main() {
12 auto x = 1;
13 if (true)
14 with (x)
15 if (false)
16 assert(90);
17 else
18 assert(91);