From 36c606fe4cc8628d815242cbee217106f9bbca0b Mon Sep 17 00:00:00 2001 From: Ivan Bondarev Date: Mon, 6 Nov 2023 20:42:54 +0100 Subject: [PATCH] fix in intellisense --- CodeCompletion/DomSyntaxTreeVisitor.cs | 5 +++++ TestSuite/intellisense_tests/arrays1.pas | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 TestSuite/intellisense_tests/arrays1.pas diff --git a/CodeCompletion/DomSyntaxTreeVisitor.cs b/CodeCompletion/DomSyntaxTreeVisitor.cs index 789ccd1d5..0af8994d3 100644 --- a/CodeCompletion/DomSyntaxTreeVisitor.cs +++ b/CodeCompletion/DomSyntaxTreeVisitor.cs @@ -164,6 +164,11 @@ namespace CodeCompletion ntr.names.Add(new ident(tn.PrintableName.Replace("()", ""))); return ntr; } + else if (tn.type_special_kind == PascalABCCompiler.SemanticTree.type_special_kind.array_kind) + { + array_type arr_type = new array_type(null, BuildSyntaxNodeForTypeReference(tn.element_type)); + return arr_type; + } var arr = tn.full_name.Split('.'); foreach (string s in arr) { diff --git a/TestSuite/intellisense_tests/arrays1.pas b/TestSuite/intellisense_tests/arrays1.pas new file mode 100644 index 000000000..9a0a16ab5 --- /dev/null +++ b/TestSuite/intellisense_tests/arrays1.pas @@ -0,0 +1,6 @@ + +uses ABCDatabases; +begin + var pupils := ЗаполнитьМассивУчеников; + var s := pupils[0].Фамилия{@property Ученик.Фамилия: string; readonly;@}; +end. \ No newline at end of file