mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +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->mLeftBlockUncond = true;
|
||||
|
||||
if (defaultBlock != endBlock)
|
||||
if ((defaultBlock != endBlock) && (switchStmt->mDefaultCase != NULL))
|
||||
mBfIRBuilder->DeleteBlock(endBlock);
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue