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:
parent
8c599ee7db
commit
cd9cf9f01f
1 changed files with 15 additions and 1 deletions
|
@ -1974,6 +1974,13 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
|
||||||
methodName += " ";
|
methodName += " ";
|
||||||
methodName += methodDef->mParams[paramIdx]->mName;
|
methodName += methodDef->mParams[paramIdx]->mName;
|
||||||
|
|
||||||
|
auto paramInitializer = methodInst->GetParamInitializer(paramIdx);
|
||||||
|
if (paramInitializer != NULL)
|
||||||
|
{
|
||||||
|
methodName += " = ";
|
||||||
|
paramInitializer->ToString(methodName);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isAbstract)
|
if (!isAbstract)
|
||||||
impString += methodDef->mParams[paramIdx]->mName;
|
impString += methodDef->mParams[paramIdx]->mName;
|
||||||
}
|
}
|
||||||
|
@ -2087,7 +2094,7 @@ void BfAutoComplete::AddOverrides(const StringImpl& filter)
|
||||||
|
|
||||||
auto activeTypeDef = mModule->GetActiveTypeDef();
|
auto activeTypeDef = mModule->GetActiveTypeDef();
|
||||||
|
|
||||||
BfTypeInstance* curType = mModule->mCurTypeInstance;
|
BfTypeInstance* curType = mModule->mCurTypeInstance;
|
||||||
while (curType != NULL)
|
while (curType != NULL)
|
||||||
{
|
{
|
||||||
for (auto methodDef : curType->mTypeDef->mMethods)
|
for (auto methodDef : curType->mTypeDef->mMethods)
|
||||||
|
@ -2118,6 +2125,13 @@ void BfAutoComplete::AddOverrides(const StringImpl& filter)
|
||||||
if ((!methodDef->mIsVirtual) || (methodDef->mIsOverride) || (methodDef->mMethodType != BfMethodType_Normal))
|
if ((!methodDef->mIsVirtual) || (methodDef->mIsOverride) || (methodDef->mMethodType != BfMethodType_Normal))
|
||||||
continue;
|
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;
|
StringT<512> insertString;
|
||||||
GetMethodInfo(methodInst, &insertString, &insertString, true, false);
|
GetMethodInfo(methodInst, &insertString, &insertString, true, false);
|
||||||
if (insertString.IsEmpty())
|
if (insertString.IsEmpty())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue