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

Handle 'func?.Invoke()'

This commit is contained in:
Brian Fiete 2025-01-18 06:48:33 -08:00
parent a1cd01cd3d
commit 910f560380
2 changed files with 14 additions and 3 deletions

View file

@ -980,8 +980,15 @@ void BfAutoComplete::AddTypeMembers(BfTypeInstance* typeInst, bool addStatic, bo
}
else
{
canUseMethod &= (CHECK_STATIC(methodDef->mIsStatic) &&
(mModule->CheckProtection(protectionCheckFlags, typeInst, methodDef->mDeclaringType->mProject, methodDef->mProtection, startType)));
if (typeInst->IsFunction())
{
canUseMethod = true;
}
else
{
canUseMethod &= (CHECK_STATIC(methodDef->mIsStatic) &&
(mModule->CheckProtection(protectionCheckFlags, typeInst, methodDef->mDeclaringType->mProject, methodDef->mProtection, startType)));
}
}
if (canUseMethod)
{