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

Fixed method selection reification

This commit is contained in:
Brian Fiete 2022-06-13 12:27:24 -07:00
parent 80d9b11166
commit 2384b7edfc

View file

@ -9107,6 +9107,9 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
lookupTypeInst = NULL; lookupTypeInst = NULL;
} }
if ((mModule->mIsReified) && (targetTypeInst != NULL) && (!targetTypeInst->mIsReified) && (!targetTypeInst->mModule->mReifyQueued))
mModule->PopulateType(targetTypeInst);
BfMethodDef* methodDef = NULL; BfMethodDef* methodDef = NULL;
BfTypeVector checkMethodGenericArguments; BfTypeVector checkMethodGenericArguments;
@ -15927,12 +15930,6 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
{ {
bool failed = false; bool failed = false;
if ((mModule->mIsReified) && (!curTypeInst->mIsReified))
{
// Make sure target type gets reified
mModule->PopulateType(curTypeInst);
}
BfTypeVector resolvedGenericArguments; BfTypeVector resolvedGenericArguments;
BfMethodState* rootMethodState = NULL; BfMethodState* rootMethodState = NULL;
if (mModule->mCurMethodState != NULL) if (mModule->mCurMethodState != NULL)