1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-11 04:52:21 +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->ResolveGenericType(paramType, NULL, genericArgumentsSubstitute, mModule->mCurTypeInstance, allowSpecializeFail);
paramType = mModule->FixIntUnknown(paramType); paramType = mModule->FixIntUnknown(paramType);
} }
if (paramType->IsConstExprValue()) if ((paramType != NULL) && (paramType->IsConstExprValue()))
{ {
paramWasConstExpr = true; paramWasConstExpr = true;
paramType = ((BfConstExprValueType*)paramType)->mType; 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->ResolveGenericType(prevParamType, NULL, prevGenericArgumentsSubstitute, mModule->mCurTypeInstance, allowSpecializeFail);
prevParamType = mModule->FixIntUnknown(prevParamType); prevParamType = mModule->FixIntUnknown(prevParamType);
} }
if (prevParamType->IsConstExprValue()) if ((prevParamType != NULL) && (prevParamType->IsConstExprValue()))
{ {
prevParamWasConstExpr = true; prevParamWasConstExpr = true;
prevParamType = ((BfConstExprValueType*)prevParamType)->mType; prevParamType = ((BfConstExprValueType*)prevParamType)->mType;