mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-29 16: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;
|
||||||
end;
|
end;
|
||||||
if (not Result) and ErrorOnNotFound then begin
|
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,
|
LFMTree.AddError(lfmeIdentifierNotPublished,LFMNode,
|
||||||
'identifier '+IdentName+' is not published in class '
|
'identifier '+IdentName+' is not published in class '
|
||||||
+'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
|
+'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
|
||||||
DefaultErrorPosition);
|
DefaultErrorPosition);
|
||||||
//else -- CheckLFMChildObject adds lfmeIdentifierMissingInCode error for this.
|
end else begin
|
||||||
// LFMTree.AddError(lfmeIdentifierNotFound,LFMNode,
|
LFMTree.AddError(lfmeIdentifierNotFound,LFMNode,
|
||||||
// 'identifier '+IdentName+' not found in class '
|
'identifier '+IdentName+' not found in class '
|
||||||
// +'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
|
+'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
|
||||||
// DefaultErrorPosition);
|
DefaultErrorPosition);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2477,16 +2478,11 @@ var
|
|||||||
end else begin
|
end else begin
|
||||||
// try the object type
|
// try the object type
|
||||||
ClassContext:=FindClassContext(LFMObject.TypeName);
|
ClassContext:=FindClassContext(LFMObject.TypeName);
|
||||||
if ClassContext.Node=nil then
|
if ClassContext.Node=nil then begin
|
||||||
// object type not found
|
// object type not found
|
||||||
LFMTree.AddError(lfmeIdentifierNotFound,LFMObject,
|
LFMTree.AddError(lfmeIdentifierNotFound,LFMObject,
|
||||||
'type '+LFMObject.TypeName+' not found',
|
'type '+LFMObject.TypeName+' not found',LFMObject.TypeNamePosition);
|
||||||
LFMObject.TypeNamePosition)
|
end;
|
||||||
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);
|
|
||||||
end;
|
end;
|
||||||
// check child LFM nodes
|
// check child LFM nodes
|
||||||
if ClassContext.Node<>nil then
|
if ClassContext.Node<>nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user