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

Fix MethodMatcher::CompareMethods

This commit is contained in:
disarray2077 2024-05-15 17:25:16 -03:00 committed by GitHub
parent aa4f9f7dfa
commit 049a3ce421
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -863,7 +863,7 @@ void BfMethodMatcher::CompareMethods(BfMethodInstance* prevMethodInstance, BfTyp
paramType = mModule->ResolveGenericType(paramType, NULL, genericArgumentsSubstitute, mModule->mCurTypeInstance, allowSpecializeFail);
paramType = mModule->FixIntUnknown(paramType);
}
if (paramType->IsConstExprValue())
if ((paramType != NULL) && (paramType->IsConstExprValue()))
{
paramWasConstExpr = true;
paramType = ((BfConstExprValueType*)paramType)->mType;
@ -875,7 +875,7 @@ void BfMethodMatcher::CompareMethods(BfMethodInstance* prevMethodInstance, BfTyp
prevParamType = mModule->ResolveGenericType(prevParamType, NULL, prevGenericArgumentsSubstitute, mModule->mCurTypeInstance, allowSpecializeFail);
prevParamType = mModule->FixIntUnknown(prevParamType);
}
if (prevParamType->IsConstExprValue())
if ((prevParamType != NULL) && (prevParamType->IsConstExprValue()))
{
prevParamWasConstExpr = true;
prevParamType = ((BfConstExprValueType*)prevParamType)->mType;