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