1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

StringView sanity check

This commit is contained in:
Brian Fiete 2024-08-17 13:01:00 -04:00
parent 6c70b2fe65
commit 4bfa087cec

View file

@ -14166,6 +14166,9 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
PopulateType(svTypeInst->mBaseType);
mBfIRBuilder->PopulateType(svTypeInst);
// Sanity check
if (svTypeInst->mMergedFieldDataCount == 2)
{
SizedArray<BfIRValue, 2> spanFieldVals;
spanFieldVals.Add(mBfIRBuilder->CreateConstAggZero(mBfIRBuilder->MapType(svTypeInst->mBaseType->mBaseType)));
@ -14187,6 +14190,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
}
}
}
}
else if (toType->IsSizedArray())
{
auto sizedArray = (BfSizedArrayType*)toType;