mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 13:24:09 +02:00
Removed error on GetRawMethodInstance null result
This commit is contained in:
parent
7958b3a38d
commit
dead14fac6
1 changed files with 19 additions and 5 deletions
|
@ -1648,11 +1648,7 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
||||||
|
|
||||||
BfMethodInstance* methodInstance = mModule->GetRawMethodInstance(typeInstance, checkMethod);
|
BfMethodInstance* methodInstance = mModule->GetRawMethodInstance(typeInstance, checkMethod);
|
||||||
if (methodInstance == NULL)
|
if (methodInstance == NULL)
|
||||||
{
|
|
||||||
if (!mModule->mCompiler->IsCePaused())
|
|
||||||
BFMODULE_FATAL(mModule, "Failed to get raw method in BfMethodMatcher::CheckMethod");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
BfMethodInstance* typeUnspecMethodInstance = mModule->GetUnspecializedMethodInstance(methodInstance, true);
|
BfMethodInstance* typeUnspecMethodInstance = mModule->GetUnspecializedMethodInstance(methodInstance, true);
|
||||||
BfTypeVector* typeGenericArguments = NULL;
|
BfTypeVector* typeGenericArguments = NULL;
|
||||||
if (typeInstance->mGenericTypeInfo != NULL)
|
if (typeInstance->mGenericTypeInfo != NULL)
|
||||||
|
@ -2330,6 +2326,24 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
||||||
goto NoMatch;
|
goto NoMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (auto methodDecl = BfNodeDynCast<BfMethodDeclaration>(checkMethod->mMethodDeclaration))
|
||||||
|
// {
|
||||||
|
// if ((methodDecl->mGenericConstraintsDeclaration != NULL) && (methodDecl->mGenericConstraintsDeclaration->mHasExpressions))
|
||||||
|
// {
|
||||||
|
// for (auto genericConstraint : methodDecl->mGenericConstraintsDeclaration->mGenericConstraints)
|
||||||
|
// {
|
||||||
|
// if (auto genericConstraintExpr = BfNodeDynCast<BfGenericConstraintExpression>(genericConstraint))
|
||||||
|
// {
|
||||||
|
// if (genericConstraintExpr->mExpression == NULL)
|
||||||
|
// continue;
|
||||||
|
// BfConstResolver constResolver(mModule);
|
||||||
|
// constResolver.mExpectingType = mModule->GetPrimitiveType(BfTypeCode_Boolean);
|
||||||
|
// constResolver.Resolve(genericConstraintExpr->mExpression, constResolver.mExpectingType);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
// Method is applicable, check to see which method is better
|
// Method is applicable, check to see which method is better
|
||||||
if (mBestMethodDef != NULL)
|
if (mBestMethodDef != NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue