mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 00:49:18 +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);
|
SimpleType:=GetSimplePascalTypeOfCVar(CNode);
|
||||||
if SimpleType='' then begin
|
if SimpleType='' then begin
|
||||||
// this variable has a complex type
|
// this variable has a complex type
|
||||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,false);
|
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,ParentNode<>nil);
|
||||||
if TypeH2PNode<>nil then
|
if TypeH2PNode<>nil then
|
||||||
SimpleType:=TypeH2PNode.PascalName;
|
SimpleType:=TypeH2PNode.PascalName;
|
||||||
end;
|
end;
|
||||||
@ -663,7 +663,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if Ok and (SimpleType='') then begin
|
if Ok and (SimpleType='') then begin
|
||||||
// this function has a complex result type
|
// this function has a complex result type
|
||||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,false);
|
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,ParentNode<>nil);
|
||||||
if TypeH2PNode<>nil then begin
|
if TypeH2PNode<>nil then begin
|
||||||
SimpleType:=TypeH2PNode.PascalName;
|
SimpleType:=TypeH2PNode.PascalName;
|
||||||
end else
|
end else
|
||||||
@ -717,7 +717,7 @@ begin
|
|||||||
DebugLn(['TH2PasTool.ConvertFuncParameter Parameter: Name="',CurName,'" Type="',CurType,'" SimpleType="',SimpleType,'"']);
|
DebugLn(['TH2PasTool.ConvertFuncParameter Parameter: Name="',CurName,'" Type="',CurType,'" SimpleType="',SimpleType,'"']);
|
||||||
if SimpleType='' then begin
|
if SimpleType='' then begin
|
||||||
// this variable has a complex type
|
// this variable has a complex type
|
||||||
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,false);
|
TypeH2PNode:=GetH2PNodeForComplexType(CNode,true,ParentNode<>nil);
|
||||||
if TypeH2PNode<>nil then
|
if TypeH2PNode<>nil then
|
||||||
SimpleType:=TypeH2PNode.PascalName;
|
SimpleType:=TypeH2PNode.PascalName;
|
||||||
end;
|
end;
|
||||||
@ -758,7 +758,7 @@ begin
|
|||||||
SimpleType:=GetSimplePascalTypeOfCVar(ChildNode);
|
SimpleType:=GetSimplePascalTypeOfCVar(ChildNode);
|
||||||
if SimpleType='' then begin
|
if SimpleType='' then begin
|
||||||
// this variable has a complex type
|
// this variable has a complex type
|
||||||
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,false);
|
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,ParentNode<>nil);
|
||||||
if TypeH2PNode<>nil then
|
if TypeH2PNode<>nil then
|
||||||
SimpleType:=TypeH2PNode.PascalName;
|
SimpleType:=TypeH2PNode.PascalName;
|
||||||
end;
|
end;
|
||||||
@ -801,7 +801,7 @@ begin
|
|||||||
SimpleType:=GetSimplePascalResultTypeOfCFunction(ChildNode);
|
SimpleType:=GetSimplePascalResultTypeOfCFunction(ChildNode);
|
||||||
if IsPointerToFunction and (SimpleType='') then begin
|
if IsPointerToFunction and (SimpleType='') then begin
|
||||||
// this function has a complex result type
|
// this function has a complex result type
|
||||||
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,false);
|
TypeH2PNode:=GetH2PNodeForComplexType(ChildNode,true,ParentNode<>nil);
|
||||||
if TypeH2PNode<>nil then
|
if TypeH2PNode<>nil then
|
||||||
SimpleType:=TypeH2PNode.PascalName;
|
SimpleType:=TypeH2PNode.PascalName;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user