From bf5c8ee3754ebcbb25a2d4f99e1574a4778ee337 Mon Sep 17 00:00:00 2001 From: ondrej Date: Thu, 2 Feb 2017 14:35:23 +0000 Subject: [PATCH] CodeTools: identifier completion: allow procedures as parameters in Delphi mode. Issue #31342 git-svn-id: trunk@54076 - --- components/codetools/identcompletiontool.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index da533748c9..8a9b7dd50f 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -2786,8 +2786,8 @@ begin CurrentIdentifierList.ContextFlags+[ilcfIsExpression, ilcfDontAllowProcedures]; end; // check if procedure is allowed - if (CurPos.Flag in [cafComma, cafRoundBracketOpen, cafEdgedBracketOpen, cafEqual, cafOtherOperator]) - or ((Scanner.CompilerMode<>cmDelphi) and (CurPos.Flag = cafAssignment)) // "MyEvent := MyProc;" is supported only in Delphi mode + if (CurPos.Flag in [cafEdgedBracketOpen, cafEqual, cafOtherOperator]) + or ((Scanner.CompilerMode<>cmDelphi) and (CurPos.Flag in [cafAssignment, cafComma, cafRoundBracketOpen])) // "MyEvent := MyProc;" and "o.Test(MyProc)" is supported only in Delphi mode then CurrentIdentifierList.ContextFlags:= CurrentIdentifierList.ContextFlags+[ilcfDontAllowProcedures];