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

Allowed undef for array allocation

This commit is contained in:
Brian Fiete 2021-06-22 07:32:06 -07:00
parent 3ce389af0f
commit 90a51834bc

View file

@ -13652,6 +13652,10 @@ void BfExprEvaluator::CreateObject(BfObjectCreateExpression* objCreateExpr, BfAs
int64 dimLength = constant->mInt64;
dimLengths.push_back(dimLength);
}
else if ((constant != NULL) && (constant->mConstType == BfConstType_Undef))
{
dimLengths.push_back(-1);
}
else
{
mModule->Fail("A constant length is required when using an initializer", dimLengthRefs[dim]);