mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed 'using static'
This commit is contained in:
parent
41629b49d1
commit
c1a2bd79e1
7 changed files with 74 additions and 36 deletions
|
@ -3692,7 +3692,7 @@ void BfCompiler::ProcessAutocompleteTempType()
|
|||
mContext->HandleChangedTypeDef(tempTypeDef, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (tempTypeDef == NULL)
|
||||
{
|
||||
GenerateAutocompleteInfo();
|
||||
|
@ -3705,13 +3705,28 @@ void BfCompiler::ProcessAutocompleteTempType()
|
|||
BfLogSysM("ProcessAutocompleteTempType - project disabled\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SetAndRestoreValue<BfMethodState*> prevMethodState(module->mCurMethodState, NULL);
|
||||
|
||||
BfTypeState typeState;
|
||||
typeState.mCurTypeDef = tempTypeDef;
|
||||
SetAndRestoreValue<BfTypeState*> prevTypeState(module->mContext->mCurTypeState, &typeState);
|
||||
|
||||
BfStaticSearch* staticSearch = NULL;
|
||||
if (mResolvePassData->mStaticSearchMap.TryAdd(tempTypeDef, NULL, &staticSearch))
|
||||
{
|
||||
for (auto typeRef : tempTypeDef->mStaticSearch)
|
||||
{
|
||||
auto type = module->ResolveTypeRef(typeRef, NULL, BfPopulateType_Declaration);
|
||||
if (type != NULL)
|
||||
{
|
||||
auto typeInst = type->ToTypeInstance();
|
||||
if (typeInst != NULL)
|
||||
staticSearch->mStaticTypes.Add(typeInst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto _FindAcutalTypeDef = [&](BfTypeDef* tempTypeDef)
|
||||
{
|
||||
auto typeName = tempTypeDef->mFullName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue