mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 17:28:00 +02:00
Properly add ref operators in override fixit
This commit is contained in:
parent
490324a300
commit
d695226657
1 changed files with 11 additions and 1 deletions
|
@ -2548,7 +2548,7 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
|
||||||
|
|
||||||
if (methodInst->GetParamKind(paramIdx) == BfParamKind_Params)
|
if (methodInst->GetParamKind(paramIdx) == BfParamKind_Params)
|
||||||
methodName += "params ";
|
methodName += "params ";
|
||||||
|
|
||||||
methodName += mModule->TypeToString(methodInst->GetParamType(paramIdx), nameFlags);
|
methodName += mModule->TypeToString(methodInst->GetParamType(paramIdx), nameFlags);
|
||||||
methodName += " ";
|
methodName += " ";
|
||||||
methodName += methodDef->mParams[paramIdx]->mName;
|
methodName += methodDef->mParams[paramIdx]->mName;
|
||||||
|
@ -2565,6 +2565,16 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
|
||||||
if (methodInst->GetParamKind(paramIdx) == BfParamKind_Params)
|
if (methodInst->GetParamKind(paramIdx) == BfParamKind_Params)
|
||||||
impString += "params ";
|
impString += "params ";
|
||||||
|
|
||||||
|
auto paramType = methodInst->GetParamType(paramIdx);
|
||||||
|
if (paramType->IsRef())
|
||||||
|
{
|
||||||
|
auto refType = (BfRefType*)paramType;
|
||||||
|
if (refType->mRefKind == BfRefType::RefKind_Ref)
|
||||||
|
impString += "ref ";
|
||||||
|
if (refType->mRefKind == BfRefType::RefKind_Out)
|
||||||
|
impString += "out ";
|
||||||
|
}
|
||||||
|
|
||||||
impString += methodDef->mParams[paramIdx]->mName;
|
impString += methodDef->mParams[paramIdx]->mName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue