mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
Add tests for bug-prone EmptyStatements
Related: https://github.com/dlang/dmd/pull/15409.
This commit is contained in:
parent
78e4d93498
commit
f1621176ef
1 changed files with 14 additions and 0 deletions
14
compiler/test/fail_compilation/empty_statement.d
Normal file
14
compiler/test/fail_compilation/empty_statement.d
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue