mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 05:14:10 +02:00
Merge pull request #949 from Fusioon/autocomplete-indexer-fix
Fix indexer autocomplete.
This commit is contained in:
commit
f12a373ae0
1 changed files with 23 additions and 1 deletions
|
@ -2306,18 +2306,40 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
|
||||||
StringT<128> propName;
|
StringT<128> propName;
|
||||||
StringT<256> impl;
|
StringT<256> impl;
|
||||||
|
|
||||||
propDeclaration->mNameNode->ToString(propName);
|
if (propDeclaration->mNameNode != NULL)
|
||||||
|
propDeclaration->mNameNode->ToString(propName);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StringT<128> args;
|
||||||
|
|
||||||
|
propName += "this[";
|
||||||
|
for (size_t paramIdx = 0, count = methodInst->GetParamCount(); paramIdx < count; ++paramIdx)
|
||||||
|
{
|
||||||
|
if (paramIdx > 0)
|
||||||
|
args += ", ";
|
||||||
|
|
||||||
|
args += mModule->TypeToString(methodInst->GetParamType(paramIdx), nameFlags);
|
||||||
|
args += " ";
|
||||||
|
args += methodDef->mParams[paramIdx]->mName;
|
||||||
|
}
|
||||||
|
propName += args;
|
||||||
|
propName += "]";
|
||||||
|
}
|
||||||
|
|
||||||
bool isAbstract = methodDef->mIsAbstract;
|
bool isAbstract = methodDef->mIsAbstract;
|
||||||
|
|
||||||
if (propDeclaration->mProtectionSpecifier != NULL)
|
if (propDeclaration->mProtectionSpecifier != NULL)
|
||||||
impl += propDeclaration->mProtectionSpecifier->ToString() + " ";
|
impl += propDeclaration->mProtectionSpecifier->ToString() + " ";
|
||||||
|
else if (isInterface && !isExplicitInterface)
|
||||||
|
impl += "public ";
|
||||||
|
|
||||||
if (!isInterface)
|
if (!isInterface)
|
||||||
impl += "override ";
|
impl += "override ";
|
||||||
|
|
||||||
BfType* propType = methodInst->mReturnType;
|
BfType* propType = methodInst->mReturnType;
|
||||||
if (methodDef->mMethodType == BfMethodType_PropertySetter)
|
if (methodDef->mMethodType == BfMethodType_PropertySetter)
|
||||||
propType = methodInst->GetParamType(0);
|
propType = methodInst->GetParamType(0);
|
||||||
|
|
||||||
impl += mModule->TypeToString(propType, nameFlags);
|
impl += mModule->TypeToString(propType, nameFlags);
|
||||||
impl += " ";
|
impl += " ";
|
||||||
if (isExplicitInterface)
|
if (isExplicitInterface)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue