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

Crash fix for variant methodToString

This commit is contained in:
Brian Fiete 2020-06-23 09:29:50 -07:00
parent fb5eaaa010
commit 291d92e097

View file

@ -9415,12 +9415,13 @@ String BfModule::MethodToString(BfMethodInstance* methodInst, BfMethodNameFlags
bool allowResolveGenericParamNames = ((methodNameFlags & BfMethodNameFlag_ResolveGenericParamNames) != 0); bool allowResolveGenericParamNames = ((methodNameFlags & BfMethodNameFlag_ResolveGenericParamNames) != 0);
BfTypeNameFlags typeNameFlags = BfTypeNameFlags_None; BfTypeNameFlags typeNameFlags = BfTypeNameFlags_None;
if ((mCurTypeInstance == NULL) || (!mCurTypeInstance->IsUnspecializedTypeVariation()))
typeNameFlags = BfTypeNameFlag_ResolveGenericParamNames;
BfType* type = methodInst->mMethodInstanceGroup->mOwner; BfType* type = methodInst->mMethodInstanceGroup->mOwner;
if ((methodGenericArgs != NULL) && (type->IsUnspecializedType())) if ((methodGenericArgs != NULL) && (type->IsUnspecializedType()))
type = ResolveGenericType(type, NULL, methodGenericArgs); type = ResolveGenericType(type, NULL, methodGenericArgs);
if ((type == NULL) || (!type->IsUnspecializedTypeVariation()))
typeNameFlags = BfTypeNameFlag_ResolveGenericParamNames;
String methodName; String methodName;
if ((methodNameFlags & BfMethodNameFlag_OmitTypeName) == 0) if ((methodNameFlags & BfMethodNameFlag_OmitTypeName) == 0)
{ {