Skip to content

Commit

Permalink
Merge pull request #3929 from yebblies/issue4374
Browse files Browse the repository at this point in the history
Issue 4374 - Required do-while ending semicolon
  • Loading branch information
9rnsr committed Aug 31, 2014
2 parents cd097aa + c59ca10 commit 8d7b4d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.c
Expand Up @@ -4612,7 +4612,7 @@ Statement *Parser::parseStatement(int flags, const utf8_t** endPtr)
if (token.value == TOKsemicolon)
nextToken();
else
deprecation("do-while statement without terminating ; is deprecated");
error("terminating ';' required after do-while statement");
s = new DoStatement(loc, body, condition);
break;
}
Expand Down
11 changes: 11 additions & 0 deletions test/fail_compilation/fail4374.d
@@ -0,0 +1,11 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail4374.d(11): Error: terminating ';' required after do-while statement
---
*/

void main()
{
do {} while(0)
}

0 comments on commit 8d7b4d1

Please sign in to comment.