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

Added default param values when adding fixit for overloads

This commit is contained in:
Brian Fiete 2020-02-21 06:52:25 -08:00
parent 8c599ee7db
commit cd9cf9f01f

View file

@ -1974,6 +1974,13 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
methodName += " ";
methodName += methodDef->mParams[paramIdx]->mName;
auto paramInitializer = methodInst->GetParamInitializer(paramIdx);
if (paramInitializer != NULL)
{
methodName += " = ";
paramInitializer->ToString(methodName);
}
if (!isAbstract)
impString += methodDef->mParams[paramIdx]->mName;
}
@ -2118,6 +2125,13 @@ void BfAutoComplete::AddOverrides(const StringImpl& filter)
if ((!methodDef->mIsVirtual) || (methodDef->mIsOverride) || (methodDef->mMethodType != BfMethodType_Normal))
continue;
if ((methodInst->mVirtualTableIdx >= 0) && (methodInst->mVirtualTableIdx < mModule->mCurTypeInstance->mVirtualMethodTable.size()))
{
auto& vEntry = mModule->mCurTypeInstance->mVirtualMethodTable[methodInst->mVirtualTableIdx];
if (vEntry.mImplementingMethod.mTypeInstance == mModule->mCurTypeInstance)
continue;
}
StringT<512> insertString;
GetMethodInfo(methodInst, &insertString, &insertString, true, false);
if (insertString.IsEmpty())