mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed incorrectly allowed type mismatch on payload enum case
This commit is contained in:
parent
9d3e245f69
commit
49c2a69a45
1 changed files with 6 additions and 3 deletions
|
@ -4464,9 +4464,12 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constantInt = mBfIRBuilder->GetConstant(caseValue.mValue);
|
if (caseValue.mType == switchValue.mType)
|
||||||
if ((constantInt != NULL) && (!mBfIRBuilder->IsInt(constantInt->mTypeCode)))
|
{
|
||||||
constantInt = NULL;
|
constantInt = mBfIRBuilder->GetConstant(caseValue.mValue);
|
||||||
|
if ((constantInt != NULL) && (!mBfIRBuilder->IsInt(constantInt->mTypeCode)))
|
||||||
|
constantInt = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue