1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 22:34:09 +02:00

Fixed type inference with unspecialized type variations

This commit is contained in:
Brian Fiete 2020-12-26 17:37:08 -08:00
parent 585db3b579
commit 91a5ef67e5

View file

@ -358,6 +358,9 @@ bool BfGenericInferContext::InferGenericArgument(BfMethodInstance* methodInstanc
auto prevArgValue = mPrevArgValues[wantGenericParam->mGenericParamIdx];
if (prevGenericMethodArg == NULL)
{
if ((argType != NULL) && (argType->IsUnspecializedTypeVariation()))
argType = mModule->ResolveGenericType(argType, NULL, mCheckMethodGenericArguments);
if (argType != NULL)
_SetGeneric();
return true;
}
@ -13911,6 +13914,11 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
if (methodDef->IsEmptyPartial())
return methodInstance;
if (methodDef->mName == "RemoveFast")
{
NOP;
}
if (methodInstance.mMethodInstance->mMethodInfoEx != NULL)
{
for (int checkGenericIdx = 0; checkGenericIdx < (int)methodInstance.mMethodInstance->mMethodInfoEx->mGenericParams.size(); checkGenericIdx++)