1
0
Fork 0
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:
Brian Fiete 2024-11-21 04:58:59 -05:00
parent 490324a300
commit d695226657

View file

@ -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;
} }
} }