d: Merge upstream dmd 47871363d, druntime, c52e28b7, phobos 99e9c1b77.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail4375i.d
blob2fe2bb718b1c8a1b4b427bae511e9623c246c2bd
1 // REQUIRED_ARGS: -w
2 // https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail4375i.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375i.d(13)
7 Error: warnings are treated as errors
8 Use -wi if you wish to treat warnings only as informational.
9 ---
12 void main() {
13 if (true)
14 switch (1) // o_O
15 default:
16 if (false)
17 assert(115);
18 else
19 assert(116);