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

Fixed type lookup for GetOperatorInfo

This commit is contained in:
Brian Fiete 2020-12-06 07:54:02 -08:00
parent 8852e7e194
commit 35c9cba898

View file

@ -9869,6 +9869,12 @@ BfOperatorInfo* BfModule::GetOperatorInfo(BfTypeInstance* typeInstance, BfOperat
SetAndRestoreValue<bool> ignoreErrors(mIgnoreErrors, true);
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCurTypeInstance, typeInstance);
SetAndRestoreValue<BfMethodInstance*> prevMethodInstance(mCurMethodInstance, NULL);
BfTypeState typeState;
typeState.mTypeInstance = typeInstance;
typeState.mCurTypeDef = operatorDef->mDeclaringType;
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
BfOperatorInfo* operatorInfo = new BfOperatorInfo();
if (operatorDef->mReturnTypeRef != NULL)
operatorInfo->mReturnType = ResolveTypeRef(operatorDef->mReturnTypeRef, BfPopulateType_Identity);