mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed [?] in BfSizedArrayCreateExpression (ie: 'int*[?](null, null)')
This commit is contained in:
parent
8194f58f59
commit
f7b3f88868
1 changed files with 9 additions and 1 deletions
|
@ -11763,7 +11763,7 @@ void BfExprEvaluator::Visit(BfMixinExpression* mixinExpr)
|
|||
|
||||
void BfExprEvaluator::Visit(BfSizedArrayCreateExpression* createExpr)
|
||||
{
|
||||
auto type = mModule->ResolveTypeRef(createExpr->mTypeRef);
|
||||
auto type = mModule->ResolveTypeRef(createExpr->mTypeRef, NULL, BfPopulateType_Data, BfResolveTypeRefFlag_AllowInferredSizedArray);
|
||||
if (type == NULL)
|
||||
return;
|
||||
|
||||
|
@ -11789,6 +11789,14 @@ void BfExprEvaluator::Visit(BfSizedArrayCreateExpression* createExpr)
|
|||
return;
|
||||
}
|
||||
|
||||
if (type->IsUndefSizedArray())
|
||||
{
|
||||
int arraySize = 0;
|
||||
if (createExpr->mInitializer != NULL)
|
||||
arraySize = (int)createExpr->mInitializer->mValues.size();
|
||||
type = mModule->CreateSizedArrayType(type->GetUnderlyingType(), arraySize);
|
||||
}
|
||||
|
||||
BfSizedArrayType* arrayType = (BfSizedArrayType*)type;
|
||||
|
||||
if (createExpr->mInitializer == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue