1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed typeState issue with exterior nodes

This commit is contained in:
Brian Fiete 2020-06-24 06:23:47 -07:00
parent c2894b0397
commit b09364cd34

View file

@ -3695,11 +3695,11 @@ void BfCompiler::ProcessAutocompleteTempType()
SetAndRestoreValue<BfMethodState*> prevMethodState(module->mCurMethodState, NULL);
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(module->mCurTypeInstance, NULL);
SetAndRestoreValue<BfMethodInstance*> prevMethodInstance(module->mCurMethodInstance, NULL);
SetAndRestoreValue<BfTypeState*> prevTypeState(module->mContext->mCurTypeState, NULL);
// >>> VisitExteriorIdentifiers
mResolvePassData->mAutoComplete->SetModule(module);
{
SetAndRestoreValue<BfTypeState*> prevTypeState(module->mContext->mCurTypeState, NULL);
BP_ZONE("VisitExteriorIdentifiers");
VisitAutocompleteExteriorIdentifiers();
}
@ -3738,7 +3738,7 @@ void BfCompiler::ProcessAutocompleteTempType()
BfTypeState typeState;
typeState.mCurTypeDef = tempTypeDef;
SetAndRestoreValue<BfTypeState*> prevTypeState(module->mContext->mCurTypeState, &typeState);
module->mContext->mCurTypeState = &typeState;
BfStaticSearch* staticSearch = NULL;
if (mResolvePassData->mStaticSearchMap.TryAdd(tempTypeDef, NULL, &staticSearch))