瀏覽代碼

Properly add ref operators in override fixit

Brian Fiete 8 月之前
父節點
當前提交
d695226657
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      IDEHelper/Compiler/BfAutoComplete.cpp

+ 11 - 1
IDEHelper/Compiler/BfAutoComplete.cpp

@@ -2548,7 +2548,7 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
 
 			if (methodInst->GetParamKind(paramIdx) == BfParamKind_Params)
 				methodName += "params ";
-
+			
 			methodName += mModule->TypeToString(methodInst->GetParamType(paramIdx), nameFlags);
 			methodName += " ";
 			methodName += methodDef->mParams[paramIdx]->mName;
@@ -2565,6 +2565,16 @@ bool BfAutoComplete::GetMethodInfo(BfMethodInstance* methodInst, StringImpl* sho
 				if (methodInst->GetParamKind(paramIdx) == BfParamKind_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;
 			}
 		}