Revert description refreshing for generic function instances (#3348)

* Revert description refreshing for generic function instances

* Add assigning original function description for generic function instances
This commit is contained in:
AlexanderZemlyak 2025-10-19 19:34:36 +03:00 committed by GitHub
parent 13b4fd3d5b
commit 5ee38daf37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1018,10 +1018,22 @@ namespace CodeCompletion
{
// в случае операции преобразования типа эта ветка срабатывает
if (ss is ElementScope && string.IsNullOrEmpty(ss.si.description) && (ss as ElementScope).sc is TypeScope)
{
ss.si.description = (ss as ElementScope).sc.Description;
}
// к сожалению, при текущей реализации обновлять описание для инстансов функций не представляется возможным
// описания типов аргументов составляются неправильно
// обновляем описание для исходной функции EVA
else if (ss is ProcScope procScope && procScope.original_function != null)
{
// обновление описания
ss = procScope.original_function.WithRefreshedDescription();
}
else
{
// обновление описания
ss = ss.WithRefreshedDescription();
}
try
{
@ -1060,11 +1072,11 @@ namespace CodeCompletion
}
}
catch (Exception e)
{
{
#if DEBUG
File.AppendAllText("log.txt", e.Message + Environment.NewLine + e.StackTrace + Environment.NewLine);
File.AppendAllText("log.txt", e.Message + Environment.NewLine + e.StackTrace + Environment.NewLine);
#endif
}
}
RestoreCurrentUsedAssemblies();
string description = ss.si.description;
if (description != null)