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

Fixed an issue using global variables in method attributes

This commit is contained in:
Brian Fiete 2020-05-09 07:24:34 -07:00
parent 1aa66761ad
commit 2e83062143
2 changed files with 3 additions and 1 deletions

View file

@ -18788,6 +18788,8 @@ void BfModule::GetMethodCustomAttributes(BfMethodInstance* methodInstance)
auto propertyMethodDeclaration = methodDef->GetPropertyMethodDeclaration();
auto typeInstance = methodInstance->GetOwner();
BfTypeState typeState(typeInstance);
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCurTypeInstance, typeInstance);
SetAndRestoreValue<BfMethodInstance*> prevMethodInstance(mCurMethodInstance, methodInstance);