Add tests for bug-prone EmptyStatements

Related: https://github.com/dlang/dmd/pull/15409.
This commit is contained in:
Nick Treleaven 2024-04-29 17:17:44 +01:00 committed by The Dlang Bot
parent 78e4d93498
commit f1621176ef

View file

@ -0,0 +1,14 @@
/*
TEST_OUTPUT:
---
fail_compilation/empty_statement.d(11): Error: use `{ }` for an empty statement, not `;`
fail_compilation/empty_statement.d(12): Error: use `{ }` for an empty statement, not `;`
fail_compilation/empty_statement.d(13): Error: use `{ }` for an empty statement, not `;`
---
*/
void main()
{
for (;;);
if (0);
while (0);
}