mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed 'unreachable' for comprehensive switch
This commit is contained in:
parent
590df7aec7
commit
748f7b8e49
1 changed files with 1 additions and 1 deletions
|
@ -4623,7 +4623,7 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
|
||||||
mCurMethodState->SetHadReturn(true);
|
mCurMethodState->SetHadReturn(true);
|
||||||
mCurMethodState->mLeftBlockUncond = true;
|
mCurMethodState->mLeftBlockUncond = true;
|
||||||
|
|
||||||
if (defaultBlock != endBlock)
|
if ((defaultBlock != endBlock) && (switchStmt->mDefaultCase != NULL))
|
||||||
mBfIRBuilder->DeleteBlock(endBlock);
|
mBfIRBuilder->DeleteBlock(endBlock);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue