From 7548bf23cda7b4e05c9b90669f98b2b4a675e90e Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 31 Dec 2024 11:46:51 -0800 Subject: [PATCH] Fixed ctor passthrough generation for AllowAppend --- IDEHelper/Compiler/BfAutoComplete.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/IDEHelper/Compiler/BfAutoComplete.cpp b/IDEHelper/Compiler/BfAutoComplete.cpp index 3ade56ab..372f9829 100644 --- a/IDEHelper/Compiler/BfAutoComplete.cpp +++ b/IDEHelper/Compiler/BfAutoComplete.cpp @@ -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 += ")";