mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 13:59:26 +02:00
codetools: h2p: fixed inserting implicit types in front of current declaration
git-svn-id: trunk@14683 -
This commit is contained in:
parent
a31259b22c
commit
2fcacdb967
@ -580,7 +580,7 @@ begin
|
||||
SimpleType:=GetSimplePascalTypeOfCVar(CNode);
|
||||
if SimpleType='' then begin
|
||||
// this variable has a complex type
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,false);
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,ParentNode<>nil);
|
||||
if TypeH2PNode<>nil then
|
||||
SimpleType:=TypeH2PNode.PascalName;
|
||||
end;
|
||||
@ -663,7 +663,7 @@ begin
|
||||
end;
|
||||
if Ok and (SimpleType='') then begin
|
||||
// this function has a complex result type
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,false);
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,ParentNode<>nil);
|
||||
if TypeH2PNode<>nil then begin
|
||||
SimpleType:=TypeH2PNode.PascalName;
|
||||
end else
|
||||
@ -717,7 +717,7 @@ begin
|
||||
DebugLn(['TH2PasTool.ConvertFuncParameter Parameter: Name="',CurName,'" Type="',CurType,'" SimpleType="',SimpleType,'"']);
|
||||
if SimpleType='' then begin
|
||||
// this variable has a complex type
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,false);
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,ParentNode<>nil);
|
||||
if TypeH2PNode<>nil then
|
||||
SimpleType:=TypeH2PNode.PascalName;
|
||||
end;
|
||||
@ -758,7 +758,7 @@ begin
|
||||
SimpleType:=GetSimplePascalTypeOfCVar(ChildNode);
|
||||
if SimpleType='' then begin
|
||||
// this variable has a complex type
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,false);
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,ParentNode<>nil);
|
||||
if TypeH2PNode<>nil then
|
||||
SimpleType:=TypeH2PNode.PascalName;
|
||||
end;
|
||||
@ -801,7 +801,7 @@ begin
|
||||
SimpleType:=GetSimplePascalResultTypeOfCFunction(ChildNode);
|
||||
if IsPointerToFunction and (SimpleType='') then begin
|
||||
// this function has a complex result type
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,false);
|
||||
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,ParentNode<>nil);
|
||||
if TypeH2PNode<>nil then
|
||||
SimpleType:=TypeH2PNode.PascalName;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user