1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed some invalid error squiggles with undef-sized arrays

This commit is contained in:
Brian Fiete 2021-10-30 07:36:14 -07:00
parent e0103b7dd7
commit 319f071eae
3 changed files with 7 additions and 4 deletions

View file

@ -16755,7 +16755,7 @@ void BfModule::EmitCtorBody(bool& skipBody)
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(fieldDef->mInitializer, BfSourceElementType_Normal);
mCompiler->mResolvePassData->mSourceClassifier->VisitChild(fieldDef->mInitializer);
auto wantType = ResolveTypeRef(fieldDef->mTypeRef);
auto wantType = ResolveTypeRef(fieldDef->mTypeRef, BfPopulateType_Declaration, BfResolveTypeRefFlag_AllowInferredSizedArray);
if ((wantType != NULL) &&
((wantType->IsVar()) || (wantType->IsLet()) || (wantType->IsRef())))
wantType = NULL;