mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixes to inferred-sized array error
This commit is contained in:
parent
f4b2d58273
commit
ce1dbd88ed
6 changed files with 12 additions and 8 deletions
|
@ -1581,7 +1581,11 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
|
|||
typeState.mCurVarInitializer = varDecl->mInitializer;
|
||||
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
|
||||
|
||||
unresolvedType = ResolveTypeRef(varDecl->mTypeRef, BfPopulateType_Data, (BfResolveTypeRefFlags)(BfResolveTypeRefFlag_NoResolveGenericParam | BfResolveTypeRefFlag_AllowRef));
|
||||
BfResolveTypeRefFlags flags = (BfResolveTypeRefFlags)(BfResolveTypeRefFlag_NoResolveGenericParam | BfResolveTypeRefFlag_AllowRef);
|
||||
if (varDecl->mInitializer != NULL)
|
||||
flags = (BfResolveTypeRefFlags)(flags | BfResolveTypeRefFlag_AllowInferredSizedArray);
|
||||
|
||||
unresolvedType = ResolveTypeRef(varDecl->mTypeRef, BfPopulateType_Data, flags);
|
||||
if (unresolvedType == NULL)
|
||||
unresolvedType = GetPrimitiveType(BfTypeCode_Var);
|
||||
resolvedType = unresolvedType;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue