1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 18:48:01 +02:00

Fixed autocomplete doc crash for generic methods

This commit is contained in:
Brian Fiete 2020-10-10 06:12:29 -07:00
parent 0f9ae6ab8c
commit 42a361a8c0
2 changed files with 36 additions and 27 deletions

View file

@ -483,7 +483,11 @@ void BfAutoComplete::AddMethod(BfTypeInstance* typeInstance, BfMethodDef* method
if ((methodInstance == NULL) && (methodDef != NULL))
methodInstance = mModule->GetRawMethodInstance(typeInstance, methodDef);
if (methodInstance != NULL)
str = mModule->MethodToString(methodInstance, BfMethodNameFlag_IncludeReturnType);
{
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mModule->mCurTypeInstance, typeInstance);
SetAndRestoreValue<BfMethodInstance*> prevCurMethodInstance(mModule->mCurMethodInstance, methodInstance);
str = mModule->MethodToString(methodInstance, (BfMethodNameFlags)(BfMethodNameFlag_IncludeReturnType | BfMethodNameFlag_ResolveGenericParamNames));
}
if (entryAdded->mDocumentation != NULL)
{