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

Improved ability of methodrefs to be used for Delegate constraints

This commit is contained in:
Brian Fiete 2022-06-13 06:52:12 -07:00
parent 7aa2fdf976
commit 46947636f7
3 changed files with 30 additions and 20 deletions

View file

@ -1920,10 +1920,10 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
goto NoMatch;
}
if ((checkMethod->mParams.mSize > 0) && (methodInstance->GetParamKind(checkMethod->mParams.mSize - 1) == BfParamKind_Params))
if ((methodInstance->mParams.mSize > 0) && (methodInstance->GetParamKind(methodInstance->mParams.mSize - 1) == BfParamKind_Params))
{
// Handle `params int[C]` generic sized array params case
auto paramsType = methodInstance->GetParamType(checkMethod->mParams.mSize - 1);
auto paramsType = methodInstance->GetParamType(methodInstance->mParams.mSize - 1);
if (paramsType->IsUnknownSizedArrayType())
{
auto unknownSizedArray = (BfUnknownSizedArrayType*)paramsType;