1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Merge pull request #1979 from disarray2077/patch-4

Fix MethodMatcher::CompareMethods
This commit is contained in:
Brian Fiete 2024-05-19 14:56:16 -04:00 committed by GitHub
commit 48a988ff70
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;