Skip to content

Commit

Permalink
test continue inside do-while (#16192)
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Feb 16, 2024
1 parent a952831 commit e9cacc3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions compiler/test/runnable/mars1.d
Original file line number Diff line number Diff line change
Expand Up @@ -2478,6 +2478,19 @@ void test21835()
if (arr[0].r != 0.0) assert(0);
}

////////////////////////////////////////////////////////////////////////
// https://github.com/dlang/dmd/pull/16187#issuecomment-1946534649

void testDoWhileContinue()
{
int i = 10;
do
{
continue;
}
while(--i > 0);
}

////////////////////////////////////////////////////////////////////////

int main()
Expand Down Expand Up @@ -2578,6 +2591,7 @@ int main()
test21256();
test21816();
test21835();
testDoWhileContinue();

printf("Success\n");
return 0;
Expand Down

0 comments on commit e9cacc3

Please sign in to comment.