Parcourir la source

Fixed parameter attribute resolution in partials in CreateTypeData

Brian Fiete il y a 1 an
Parent
commit
4b59c1463c
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      IDEHelper/Compiler/BfModule.cpp

+ 5 - 0
IDEHelper/Compiler/BfModule.cpp

@@ -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)