From 8ca0a00baf5add8a85252217d6c165375a8d6733 Mon Sep 17 00:00:00 2001 From: Ivan Bondarev Date: Wed, 11 Aug 2021 12:02:20 +0200 Subject: [PATCH] fix pascalabcnet/pascalabcnetide#215 --- CodeCompletion/SymTable.cs | 6 ++++++ TestSuite/overloads11.pas | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 TestSuite/overloads11.pas diff --git a/CodeCompletion/SymTable.cs b/CodeCompletion/SymTable.cs index 09a6ccd2a..0ee3cd8fb 100644 --- a/CodeCompletion/SymTable.cs +++ b/CodeCompletion/SymTable.cs @@ -6742,6 +6742,12 @@ namespace CodeCompletion return names; } } + if (sil.Count > 1 && sil[0].sym_info.semantic_node_type != semantic_node_type.compiled_function_node && sil[0].sym_info.semantic_node_type != semantic_node_type.compiled_constructor_node) + { + var si = sil[0]; + sil.Remove(sil[0]); + sil.Add(si); + } switch (sil.FirstOrDefault().sym_info.semantic_node_type) { case semantic_node_type.compiled_function_node: diff --git a/TestSuite/overloads11.pas b/TestSuite/overloads11.pas new file mode 100644 index 000000000..ce8789f83 --- /dev/null +++ b/TestSuite/overloads11.pas @@ -0,0 +1,3 @@ +begin + System.Globalization.UnicodeCategory.Format{@static function Enum.Format(enumType: Type; value: Object; format: string): string;@}(typeof(System.Globalization.UnicodeCategory), a, 'd'); +end. \ No newline at end of file