diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index f2671801de..09c22915ed 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -2639,7 +2639,8 @@ var ctnClassTypePublished,ctnClassTypePublic,ctnClassTypeProtected,ctnClassTypePrivate, ctnClassVarPublished,ctnClassVarPublic,ctnClassVarProtected,ctnClassVarPrivate, ctnRecordVariant, - ctnProcedureHead, ctnParameterList: + ctnProcedureHead, ctnParameterList, + ctnClassInheritance: // these codetreenodes build a parent-child-relationship, but // for pascal it is only a range, hence after searching in the // childs of the last node, search must continue in the childs @@ -4291,7 +4292,7 @@ begin -[fdfExceptionOnNotFound]; Params.ContextNode:=ClassContext.Node; {$IFDEF ShowTriedContexts} - DebugLn('[TFindDeclarationTool.FindIdentifierInClassOfMethod] searching identifier in class of method'); + DebugLn('[TFindDeclarationTool.FindIdentifierInClassOfMethod] searching identifier in class of method Identifier=',GetIdentifier(Params.Identifier)); {$ENDIF} Result:=ClassContext.Tool.FindIdentifierInContext(Params); Params.Load(OldInput,true); diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 06ab7d09aa..d60fdf4e67 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -3314,6 +3314,10 @@ begin if ChildCreated and (CurNode.Desc=ctnClass) and IsForward then begin // forward class definition found CurNode.SubDesc:=CurNode.SubDesc+ctnsForwardDeclaration; + end else begin + // very short class found e.g. = class(TAncestor); + if ChildCreated and (CurNode.Desc=ctnClass) then + CurNode.SubDesc:=CurNode.SubDesc+ctnsNeedJITParsing; // will not create sub nodes now end; end else begin if ChildCreated and (CurNode.Desc=ctnClass) then