Fix cast operation check in Intellisense

Неправильная проверка для случая пустого массива names приводила к отсутствию подсказки по наведению на функцию Filter класса DataFrame.
This commit is contained in:
Александр Земляк 2026-05-10 22:32:04 +03:00
parent de75f00031
commit 15f45c258f

View file

@ -1160,7 +1160,16 @@ namespace CodeCompletion
_method_call.dereferencing_value.visit(this); _method_call.dereferencing_value.visit(this);
search_all = false; search_all = false;
SymScope[] names = returned_scopes.ToArray(); SymScope[] names = returned_scopes.ToArray();
if (names.Length > 0 && names[0] is ElementScope && (names[0] as ElementScope).sc is TypeScope && ((names[0] as ElementScope).sc as TypeScope).IsDelegate)
// Не нашли кандидатов - возврат
if (names.Length == 0)
{
returned_scope = null;
method_call_cache[_method_call] = null;
return;
}
if (names[0] is ElementScope && (names[0] as ElementScope).sc is TypeScope && ((names[0] as ElementScope).sc as TypeScope).IsDelegate)
{ {
returned_scope = names[0]; returned_scope = names[0];
method_call_cache[_method_call] = returned_scope; method_call_cache[_method_call] = returned_scope;
@ -1211,7 +1220,7 @@ namespace CodeCompletion
} }
ProcScope ps = select_method(names, null, null, obj, _method_call.parameters != null ? _method_call.parameters.expressions.ToArray() : null); ProcScope ps = select_method(names, null, null, obj, _method_call.parameters != null ? _method_call.parameters.expressions.ToArray() : null);
returned_scope = ps; returned_scope = ps;
if (ps == null && names.Length > 0) if (ps == null)
{ {
returned_scope = null; returned_scope = null;