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

Fixed parameter attribute resolution in partials in CreateTypeData

This commit is contained in:
Brian Fiete 2024-01-24 06:42:31 -05:00
parent f7dbe88169
commit 4b59c1463c

View file

@ -7335,6 +7335,11 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCurTypeInstance, typeInstance); SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCurTypeInstance, typeInstance);
if (auto methodDeclaration = methodDef->GetMethodDeclaration()) if (auto methodDeclaration = methodDef->GetMethodDeclaration())
{ {
BfTypeState typeState;
typeState.mPrevState = mContext->mCurTypeState;
typeState.mForceActiveTypeDef = methodDef->mDeclaringType;
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
for (BfParameterDeclaration* paramDecl : methodDeclaration->mParams) for (BfParameterDeclaration* paramDecl : methodDeclaration->mParams)
{ {
if (paramDecl->mAttributes != NULL) if (paramDecl->mAttributes != NULL)