From d36c84686dfa42d28161a97a80ef2698205f98ae Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 18 May 2018 08:04:31 +0000 Subject: [PATCH] codetools: parse external class const git-svn-id: trunk@57954 - --- components/codetools/identcompletiontool.pas | 2 +- components/codetools/pascalparsertool.pas | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index 1613735d0c..2d814631af 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -1664,8 +1664,8 @@ begin NewItem.IdentifierStartInUnitName := 1; {$IFDEF VerboseICGatherUnitNames} //debugln(['TIdentCompletionTool.GatherUnitnames Add ',UnitFileInfo.FileUnitName,' NewCount=',CurrentIdentifierList]); - CurrentIdentifierList.Add(NewItem); {$ENDIF} + CurrentIdentifierList.Add(NewItem); end; end; if FIDTTreeOfNamespaces<>nil then diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index ab08ef9644..99599d4d65 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -4030,7 +4030,11 @@ begin end; end else begin UndoReadNextAtom; - SaveRaiseCharExpectedButAtomFound(20180507200240,'='); + if (CurNode.Parent.Desc=ctnConstSection) + and (CurNode.Parent.Parent.Desc in AllClassBaseSections) then + // ok + else + SaveRaiseCharExpectedButAtomFound(20180507200240,'='); end; end else ReadConstExpr;