mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-29 04:56:15 +02:00
Codetools: revert changes in TStandardCodeTool.CheckLFM from r41948 #1182ff0df2. Caused regressions. Issue #24702
git-svn-id: trunk@41984 -
This commit is contained in:
parent
06c4055b7c
commit
4f96dcd578
@ -2269,16 +2269,17 @@ var
|
||||
end;
|
||||
end;
|
||||
if (not Result) and ErrorOnNotFound then begin
|
||||
if (IdentContext.Node<>nil) and (not IsPublished) then
|
||||
if (IdentContext.Node<>nil) and (not IsPublished) then begin
|
||||
LFMTree.AddError(lfmeIdentifierNotPublished,LFMNode,
|
||||
'identifier '+IdentName+' is not published in class '
|
||||
+'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
|
||||
DefaultErrorPosition);
|
||||
//else -- CheckLFMChildObject adds lfmeIdentifierMissingInCode error for this.
|
||||
// LFMTree.AddError(lfmeIdentifierNotFound,LFMNode,
|
||||
// 'identifier '+IdentName+' not found in class '
|
||||
// +'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
|
||||
// DefaultErrorPosition);
|
||||
end else begin
|
||||
LFMTree.AddError(lfmeIdentifierNotFound,LFMNode,
|
||||
'identifier '+IdentName+' not found in class '
|
||||
+'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
|
||||
DefaultErrorPosition);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2477,16 +2478,11 @@ var
|
||||
end else begin
|
||||
// try the object type
|
||||
ClassContext:=FindClassContext(LFMObject.TypeName);
|
||||
if ClassContext.Node=nil then
|
||||
if ClassContext.Node=nil then begin
|
||||
// object type not found
|
||||
LFMTree.AddError(lfmeIdentifierNotFound,LFMObject,
|
||||
'type '+LFMObject.TypeName+' not found',
|
||||
LFMObject.TypeNamePosition)
|
||||
else
|
||||
// object type found but has no variable in code
|
||||
LFMTree.AddError(lfmeIdentifierMissingInCode,LFMObject,
|
||||
'no variable in code for '+LFMObjectName+', type '+LFMObject.TypeName,
|
||||
LFMObject.TypeNamePosition);
|
||||
'type '+LFMObject.TypeName+' not found',LFMObject.TypeNamePosition);
|
||||
end;
|
||||
end;
|
||||
// check child LFM nodes
|
||||
if ClassContext.Node<>nil then
|
||||
|
Loading…
Reference in New Issue
Block a user