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

Fixed ctor passthrough generation for AllowAppend

This commit is contained in:
Brian Fiete 2024-12-31 11:46:51 -08:00
parent 45d6a12d5d
commit 7548bf23cd

View file

@ -2505,6 +2505,9 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
auto methodDeclaration = methodDef->GetMethodDeclaration();
if (methodDef->mHasAppend)
methodPrefix += "[AllowAppend]\r";
if (isInterface)
{
if (!isExplicitInterface)
@ -2548,10 +2551,15 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
methodName += ">";
}
int usedParamIdx = 0;
methodName += "(";
for (int paramIdx = 0; paramIdx < (int)methodInst->GetParamCount(); paramIdx++)
{
if (paramIdx > 0)
{
if (methodInst->GetParamKind(paramIdx) == BfParamKind_AppendIdx)
continue;
if (usedParamIdx > 0)
{
methodName += ", ";
if (!isAbstract)
@ -2589,6 +2597,7 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
impString += methodDef->mParams[paramIdx]->mName;
}
usedParamIdx++;
}
methodName += ")";