From 7d402a8415ee3e90d95e89dfdeb2db3207f6ae56 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 18 Sep 2013 21:29:59 +0000 Subject: [PATCH] codetools: fixed checking if resolving edged bracket open is allowed, bug #25045 git-svn-id: trunk@42868 - --- components/codetools/examples/identifiercompletion.lpr | 1 + components/codetools/finddeclarationtool.pas | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/codetools/examples/identifiercompletion.lpr b/components/codetools/examples/identifiercompletion.lpr index 3192e21c6a..c7ef9813a2 100644 --- a/components/codetools/examples/identifiercompletion.lpr +++ b/components/codetools/examples/identifiercompletion.lpr @@ -46,6 +46,7 @@ begin writeln('Usage:'); writeln(' ',ParamStr(0)); writeln(' ',ParamStr(0),' '); + exit; end; CodeToolBoss.SimpleInit(ConfigFilename); diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index 98dbc31a78..0d2c55bf0c 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -7565,8 +7565,6 @@ var end; if (not (NextAtomType in [vatSpace,vatPoint,vatAs,vatUp,vatRoundBracketClose, vatRoundBracketOpen,vatEdgedBracketClose,vatEdgedBracketOpen])) - or ((ExprType.Context.Node=nil) - and (not (ExprType.Desc in EdgedBracketContexts))) then begin MoveCursorToCleanPos(NextAtom.StartPos); ReadNextAtom; @@ -7584,6 +7582,11 @@ var ExprType.Context.Node:=nil; exit; end; + if ExprType.Context.Node=nil then begin + MoveCursorToCleanPos(NextAtom.StartPos); + ReadNextAtom; + RaiseIllegalQualifierFound; + end; {$IFDEF ShowExprEval} DebugLn([' FindExpressionTypeOfTerm ResolveEdgedBracketOpen ExprType=',ExprTypeToString(ExprType)]);