From b7df4425549a6014e2343db60ff5e685efc25dea 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: Sun, 16 Dec 2018 18:19:51 +0100 Subject: [PATCH] fix #1579 --- CodeCompletion/ExpressionVisitor.cs | 2 +- TestSuite/intellisense_tests/extensionmethods9.pas | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 TestSuite/intellisense_tests/extensionmethods9.pas diff --git a/CodeCompletion/ExpressionVisitor.cs b/CodeCompletion/ExpressionVisitor.cs index 06989a211..7b16dcab6 100644 --- a/CodeCompletion/ExpressionVisitor.cs +++ b/CodeCompletion/ExpressionVisitor.cs @@ -841,7 +841,7 @@ namespace CodeCompletion returned_scope = CheckForAccess(left_scope as TypeScope, returned_scope as ElementScope); return; } - if (returned_scope != null && returned_scope is ProcScope) + if (returned_scope != null && returned_scope is ProcScope && !((returned_scope as ProcScope).IsStatic && tmp_tn is ElementScope)) { if ((returned_scope as ProcScope).return_type == null) { diff --git a/TestSuite/intellisense_tests/extensionmethods9.pas b/TestSuite/intellisense_tests/extensionmethods9.pas new file mode 100644 index 000000000..9bc741edf --- /dev/null +++ b/TestSuite/intellisense_tests/extensionmethods9.pas @@ -0,0 +1,4 @@ +begin + var ch: char; + ch.IsDigit{@(расширение) function char.IsDigit(): boolean;@}; +end. \ No newline at end of file