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

Zero-sized array count lookup fix

This commit is contained in:
Brian Fiete 2020-12-25 05:35:51 -08:00
parent 27a586df04
commit 8c391fe4f5

View file

@ -8749,6 +8749,9 @@ void BfExprEvaluator::LookupQualifiedName(BfAstNode* nameNode, BfIdentifierNode*
if (mResult.mType->IsSizedArray())
{
mResult.mType = mModule->GetWrappedStructType(mResult.mType);
if (mResult.mType->IsValuelessType())
mResult.mValue = mModule->mBfIRBuilder->GetFakeVal();
else
mResult.mValue = mModule->mBfIRBuilder->CreateBitCast(mResult.mValue, mModule->mBfIRBuilder->MapTypeInstPtr(mResult.mType->ToTypeInstance()));
}
else if (mResult.mType->IsWrappableType())