From 15f45c258f4ae0734f4b457caa2733c5ce763314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B5=D0=BC=D0=BB=D1=8F=D0=BA?= Date: Sun, 10 May 2026 22:32:04 +0300 Subject: [PATCH] Fix cast operation check in Intellisense MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Неправильная проверка для случая пустого массива names приводила к отсутствию подсказки по наведению на функцию Filter класса DataFrame. --- CodeCompletion/ExpressionVisitor.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CodeCompletion/ExpressionVisitor.cs b/CodeCompletion/ExpressionVisitor.cs index 37de377ed..c6be312f2 100644 --- a/CodeCompletion/ExpressionVisitor.cs +++ b/CodeCompletion/ExpressionVisitor.cs @@ -1160,7 +1160,16 @@ namespace CodeCompletion _method_call.dereferencing_value.visit(this); search_all = false; 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]; 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); returned_scope = ps; - if (ps == null && names.Length > 0) + if (ps == null) { returned_scope = null;