d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail4375t.d
blob07a79e57200f140838679e42f8e7fe5b62279562
1 // REQUIRED_ARGS: -w -unittest
2 // https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail4375t.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375t.d(13)
7 Error: warnings are treated as errors
8 Use -wi if you wish to treat warnings only as informational.
9 ---
12 unittest { // disallowed
13 if (true)
14 if (false)
15 assert(52);
16 else
17 assert(53);