mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-01 21:19:25 +02:00
pastojs: delayed inits only for fully specialized types
git-svn-id: trunk@47665 -
(cherry picked from commit 1c1e994ffc
)
This commit is contained in:
parent
f4aca292c1
commit
520502abeb
@ -5224,6 +5224,7 @@ begin
|
||||
|
||||
El:=SpecializedItem.SpecializedEl;
|
||||
if (El is TPasGenericType)
|
||||
and IsFullySpecialized(TPasGenericType(El))
|
||||
and (SpecializeParamsNeedDelay(SpecializedItem)<>nil) then
|
||||
TPas2JSResolverHub(Hub).AddJSDelaySpecialize(TPasGenericType(El));
|
||||
|
||||
@ -17579,6 +17580,8 @@ var
|
||||
aResolver: TPas2JSResolver;
|
||||
begin
|
||||
if not IsElementUsed(El) then exit;
|
||||
if not AContext.Resolver.IsFullySpecialized(El) then
|
||||
RaiseNotSupported(El,AContext,20201202145045,'not fully specialized, probably a bug in the analyzer');
|
||||
if not SpecializeNeedsDelay(El,AContext) then exit;
|
||||
C:=El.ClassType;
|
||||
if (C=TPasRecordType)
|
||||
|
Loading…
Reference in New Issue
Block a user