mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fix extern method constraints that end up not being extern
This commit is contained in:
parent
a277fa18cf
commit
1b7dbd7288
2 changed files with 26 additions and 2 deletions
|
@ -2282,6 +2282,22 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
|||
}
|
||||
}
|
||||
|
||||
if (externType->IsGenericParam())
|
||||
{
|
||||
auto genericParamType = (BfGenericParamType*)externType;
|
||||
if (genericParamType->mGenericParamKind == BfGenericParamKind_Method)
|
||||
{
|
||||
auto genericArg = (*genericArgumentsSubstitute)[genericParamType->mGenericParamIdx];
|
||||
if (genericArg == NULL)
|
||||
{
|
||||
if (allowEmptyGenericSet.Contains(genericParamType->mGenericParamIdx))
|
||||
continue;
|
||||
goto NoMatch;
|
||||
}
|
||||
externType = genericArg;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mModule->CheckGenericConstraints(BfGenericParamSource(methodInstance), externType, NULL, genericParam, externGenericArgumentsSubstitute, NULL))
|
||||
goto NoMatch;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue