mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fix for sized array initializer with global variables
This commit is contained in:
parent
cd09529c9a
commit
3509d659ea
2 changed files with 10 additions and 2 deletions
|
@ -720,7 +720,14 @@ void BeIRCodeGen::Read(BeValue*& beValue)
|
|||
auto constStruct = mBeModule->mOwnedValues.Alloc<BeStructConstant>();
|
||||
constStruct->mType = type;
|
||||
for (auto val : values)
|
||||
constStruct->mMemberValues.push_back(BeValueDynCast<BeConstant>(val));
|
||||
{
|
||||
BeConstant* constant = BeValueDynCast<BeConstant>(val);
|
||||
constStruct->mMemberValues.push_back(constant);
|
||||
#ifdef _DEBUG
|
||||
auto memberType = constant->GetType();
|
||||
BF_ASSERT(memberType == arrayType->mElementType);
|
||||
#endif
|
||||
}
|
||||
beValue = constStruct;
|
||||
BE_MEM_END("ParamType_Const_Array");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue