diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 2dc8c4c153..25bf7d0fb9 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -4237,6 +4237,8 @@ begin CurNode.Desc:=ctnGenericParams; ReadNextAtom; //debugln(['TPascalParserTool.ReadGenericParamList START ctnGenericParams ',GetAtom]); + if UpAtomIs('CONST') then // read const after < + ReadNextAtom; if AtomIsIdentifier then begin CreateChildNode; CurNode.Desc:=ctnGenericParameter; @@ -4253,6 +4255,8 @@ begin // read next name EndChildNode; ReadNextAtom; + if UpAtomIs('CONST') then // read const after , or ; + ReadNextAtom; AtomIsIdentifierSaveE(20180411194201); CreateChildNode; CurNode.Desc:=ctnGenericParameter;