mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:26:24 +02:00
pastojs: fixed mark impl scope ref of VarRecs
git-svn-id: trunk@41350 -
This commit is contained in:
parent
73e1846222
commit
3ecfa10417
@ -48,6 +48,8 @@ procedure TPas2JSAnalyzer.UseExpr(El: TPasExpr);
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
ArgType: TPasType;
|
ArgType: TPasType;
|
||||||
ModScope: TPas2JSModuleScope;
|
ModScope: TPas2JSModuleScope;
|
||||||
|
aMod: TPasModule;
|
||||||
|
SystemVarRecs: TPasFunction;
|
||||||
begin
|
begin
|
||||||
if Args=nil then exit;
|
if Args=nil then exit;
|
||||||
for i:=0 to Args.Count-1 do
|
for i:=0 to Args.Count-1 do
|
||||||
@ -58,10 +60,13 @@ procedure TPas2JSAnalyzer.UseExpr(El: TPasExpr);
|
|||||||
and (TPasArrayType(ArgType).ElType=nil) then
|
and (TPasArrayType(ArgType).ElType=nil) then
|
||||||
begin
|
begin
|
||||||
// array of const
|
// array of const
|
||||||
ModScope:=NoNil(Resolver.RootElement.CustomData) as TPas2JSModuleScope;
|
aMod:=El.GetModule;
|
||||||
if ModScope.SystemVarRecs=nil then
|
ModScope:=NoNil(aMod.CustomData) as TPas2JSModuleScope;
|
||||||
|
SystemVarRecs:=ModScope.SystemVarRecs;
|
||||||
|
if SystemVarRecs=nil then
|
||||||
RaiseNotSupported(20190216104347,El);
|
RaiseNotSupported(20190216104347,El);
|
||||||
UseProcedure(ModScope.SystemVarRecs);
|
MarkImplScopeRef(El,SystemVarRecs,psraRead);
|
||||||
|
UseProcedure(SystemVarRecs);
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user