1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed cases of undetected ambiguous calls

This commit is contained in:
Brian Fiete 2020-10-08 12:09:04 -07:00
parent e8b35ce0c4
commit 4cea33d96f
6 changed files with 94 additions and 14 deletions

View file

@ -868,7 +868,7 @@ String BfMethodInstance::GetParamName(int paramIdx)
return paramName;
}
BfType* BfMethodInstance::GetParamType(int paramIdx, bool useResolvedType)
BfType* BfMethodInstance::GetParamType(int paramIdx, bool returnUnderlyingParamsType)
{
if (paramIdx == -1)
{
@ -892,6 +892,19 @@ BfType* BfMethodInstance::GetParamType(int paramIdx, bool useResolvedType)
BfMethodInstance* invokeMethodInstance = methodParam->GetDelegateParamInvoke();
return invokeMethodInstance->GetParamType(methodParam->mDelegateParamIdx, true);
}
if (returnUnderlyingParamsType)
{
BfParameterDef* paramDef = mMethodDef->mParams[methodParam->mParamDefIdx];
if (paramDef->mParamKind == BfParamKind_Params)
{
auto underlyingType = methodParam->mResolvedType->GetUnderlyingType();
if (underlyingType != NULL)
return underlyingType;
return methodParam->mResolvedType;
}
}
return methodParam->mResolvedType;
}