From 1bc89d8ffca535d5c75cd370877313a1d72ddcfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D0=BD=D0=B4=D0=B0=D1=80=D0=B5=D0=B2=20=D0=98?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD?= Date: Fri, 27 Dec 2019 11:19:25 +0100 Subject: [PATCH] fix pascalabcnet/pascalabcnetide#101 --- CodeCompletion/ExpressionVisitor.cs | 4 ++++ TestSuite/intellisense_tests/staticmethod1.pas | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 TestSuite/intellisense_tests/staticmethod1.pas diff --git a/CodeCompletion/ExpressionVisitor.cs b/CodeCompletion/ExpressionVisitor.cs index 61f0d0c09..c7caf9ba9 100644 --- a/CodeCompletion/ExpressionVisitor.cs +++ b/CodeCompletion/ExpressionVisitor.cs @@ -936,6 +936,10 @@ namespace CodeCompletion { returned_scopes[i] = null; } + else if (left_scope is TypeScope && returned_scopes[i] is ProcScope && !(returned_scopes[i] as ProcScope).IsStatic && !(returned_scopes[i] as ProcScope).IsConstructor()) + { + returned_scopes[i] = null; + } } returned_scopes.RemoveAll(x => x == null); diff --git a/TestSuite/intellisense_tests/staticmethod1.pas b/TestSuite/intellisense_tests/staticmethod1.pas new file mode 100644 index 000000000..d1fecb612 --- /dev/null +++ b/TestSuite/intellisense_tests/staticmethod1.pas @@ -0,0 +1,3 @@ +begin + System.Convert.ToString{@static function Convert.ToString(value: Object): string;@}(); +end. \ No newline at end of file