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:
parent
6c70b2fe65
commit
4bfa087cec
1 changed files with 21 additions and 17 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue