mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed some const constraint undef issues
This commit is contained in:
parent
f35a3de175
commit
249f4f1016
4 changed files with 58 additions and 18 deletions
|
@ -4074,7 +4074,10 @@ BfIRValue BfIRBuilder::CreateNumericCast(BfIRValue val, bool valIsSigned, BfType
|
|||
FixTypeCode(typeCode);
|
||||
if (val.IsConst())
|
||||
{
|
||||
auto constVal = GetConstantById(val.mId);
|
||||
auto constVal = GetConstantById(val.mId);
|
||||
if (constVal->mConstType == BfConstType_Undef)
|
||||
return GetUndefConstValue(GetPrimitiveType(typeCode));
|
||||
|
||||
if (constVal->mTypeCode < BfTypeCode_Length)
|
||||
{
|
||||
// ? -> Int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue