codetools: enumerator can be also a record

git-svn-id: trunk@50826 -
This commit is contained in:
ondrej 2015-12-15 21:21:42 +00:00
parent 44119ab600
commit 599e0821fb

View File

@ -11746,7 +11746,7 @@ begin
{$IFDEF ShowForInEval}
DebugLn(['TFindDeclarationTool.FindEnumeratorOfClass EnumeratorContext=',FindContextToString(EnumeratorContext)]);
{$ENDIF}
if (EnumeratorContext.Node=nil) or (EnumeratorContext.Node.Desc<>ctnClass)
if (EnumeratorContext.Node=nil) or not(EnumeratorContext.Node.Desc in [ctnClass,ctnRecordType])
then begin
if ExceptionOnNotFound then begin
ProcTool.MoveCursorToCleanPos(ProcNode.StartPos);