1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Improved semicolon handling for inline anonymous type references

This commit is contained in:
Brian Fiete 2025-01-04 12:47:45 -08:00
parent 34cfe603e6
commit a6a891d800
3 changed files with 36 additions and 8 deletions

View file

@ -15588,11 +15588,12 @@ void BfExprEvaluator::CheckObjectCreateTypeRef(BfType* expectingType, BfAstNode*
auto arrayType = (BfArrayType*)expectingType;
expectingType = arrayType->mGenericTypeInfo->mTypeGenericArguments[0];
}
auto expectingTypeInst = expectingType->ToTypeInstance();
if (expectingTypeInst != NULL)
{
autoComplete->AddTypeInstanceEntry(expectingTypeInst);
if (!expectingTypeInst->IsAnonymous())
autoComplete->AddTypeInstanceEntry(expectingTypeInst);
}
else
autoComplete->mDefaultSelection = mModule->TypeToString(expectingType);