1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Added [?] implied size for sized arrays with initializers

This commit is contained in:
Brian Fiete 2020-06-13 08:36:39 -07:00
parent 82d2963a9e
commit 08e38a03f9
10 changed files with 250 additions and 162 deletions

View file

@ -1563,6 +1563,10 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
}
else
{
BfTypeState typeState;
typeState.mCurVarInitializer = varDecl->mInitializer;
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
unresolvedType = ResolveTypeRef(varDecl->mTypeRef, BfPopulateType_Data, (BfResolveTypeRefFlags)(BfResolveTypeRefFlag_NoResolveGenericParam | BfResolveTypeRefFlag_AllowRef));
if (unresolvedType == NULL)
unresolvedType = GetPrimitiveType(BfTypeCode_Var);