1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-25 19:18:01 +02:00

Allow for '.' allocation of raw arrays

This commit is contained in:
Brian Fiete 2020-05-18 06:58:22 -07:00
parent 76dfe97d78
commit 8745b40828

View file

@ -11159,8 +11159,8 @@ void BfExprEvaluator::Visit(BfObjectCreateExpression* objCreateExpr)
if (auto dotTypeRef = BfNodeDynCast<BfDotTypeReference>(arrayTypeRef->mElementType)) if (auto dotTypeRef = BfNodeDynCast<BfDotTypeReference>(arrayTypeRef->mElementType))
{ {
if ((mExpectingType != NULL) && if ((mExpectingType != NULL) &&
((mExpectingType->IsArray()) || (mExpectingType->IsSizedArray()))) ((mExpectingType->IsArray()) || (mExpectingType->IsPointer()) || (mExpectingType->IsSizedArray())))
unresolvedTypeRef = mExpectingType->GetUnderlyingType(); unresolvedTypeRef = mExpectingType->GetUnderlyingType();
} }
if (unresolvedTypeRef == NULL) if (unresolvedTypeRef == NULL)
unresolvedTypeRef = mModule->ResolveTypeRef(arrayTypeRef->mElementType); unresolvedTypeRef = mModule->ResolveTypeRef(arrayTypeRef->mElementType);