pastojs: fixed compile

git-svn-id: trunk@40672 -
This commit is contained in:
Mattias Gaertner 2018-12-27 08:18:26 +00:00
parent 19836867da
commit 324a645bb5

View File

@ -1226,7 +1226,7 @@ type
procedure ResolveFuncParamsExpr(Params: TParamsExpr; procedure ResolveFuncParamsExpr(Params: TParamsExpr;
Access: TResolvedRefAccess); override; Access: TResolvedRefAccess); override;
procedure FinishInterfaceSection(Section: TPasSection); override; procedure FinishInterfaceSection(Section: TPasSection); override;
procedure FinishTypeSection(El: TPasDeclarations); override; procedure FinishTypeSectionEl(El: TPasType); override;
procedure FinishModule(CurModule: TPasModule); override; procedure FinishModule(CurModule: TPasModule); override;
procedure FinishEnumType(El: TPasEnumType); override; procedure FinishEnumType(El: TPasEnumType); override;
procedure FinishSetType(El: TPasSetType); override; procedure FinishSetType(El: TPasSetType); override;
@ -3038,26 +3038,21 @@ begin
end; end;
end; end;
procedure TPas2JSResolver.FinishTypeSection(El: TPasDeclarations); procedure TPas2JSResolver.FinishTypeSectionEl(El: TPasType);
var var
i: Integer;
Decl: TPasElement;
C: TClass; C: TClass;
TypeEl: TPasType; TypeEl: TPasType;
begin begin
inherited FinishTypeSection(El); inherited FinishTypeSectionEl(El);
for i:=0 to El.Declarations.Count-1 do
C:=El.ClassType;
if C=TPasPointerType then
begin begin
Decl:=TPasElement(El.Declarations[i]); TypeEl:=ResolveAliasType(TPasPointerType(El).DestType);
C:=Decl.ClassType; if TypeEl.ClassType=TPasRecordType then
if C=TPasPointerType then // ^record
begin else
TypeEl:=ResolveAliasType(TPasPointerType(Decl).DestType); RaiseMsg(20180423105726,nNotSupportedX,sNotSupportedX,['pointer of '+TPasPointerType(El).DestType.Name],El);
if TypeEl.ClassType=TPasRecordType then
// ^record
else
RaiseMsg(20180423105726,nNotSupportedX,sNotSupportedX,['pointer of '+TPasPointerType(Decl).DestType.Name],Decl);
end;
end; end;
end; end;